echo Yii::app()->createUrl("{$route}", array('id' => $c, 's' => 'VIDEO')); ?> "><?php echo Yii::t('wap', 'Video'); ?> </a></li> <?php } else { ?> <li><a href="<?php echo URLHelper::makeUrlGenre(array("type" => $type, 'name' => $name, 'id' => $c, 'gt' => 'new')); ?> "><?php echo Yii::t('wap', 'New'); ?> </a></li> <li><a href="<?php echo URLHelper::makeUrlGenre(array("type" => $type, 'name' => $name, 'id' => $c, 'gt' => 'hot')); ?> "><?php echo Yii::t('wap', 'Hot'); ?> </a></li> <?php } ?> </ul> </div> </div> </div>
private function createPageUrlSeo($pageNumber = 0) { $link = "#"; if (!empty($this->suffix) && !empty($this->object_link)) { $object = $this->object_link; if ($pageNumber > 0) { $object['other']['p'] = $pageNumber + 1; } switch ($this->suffix) { case 'gr': //genre $link = URLHelper::makeUrlGenre($object); break; case 'at': //genre //genre case 'ai': //artist_list $link = URLHelper::makeUrlMultiLevel($object); break; } } else { $link = Yii::app()->request->requestUri; preg_match("/p=(\\w+)/", $link, $match); if ($match) { if (!empty($match[0])) { if ($pageNumber > 0) { $p = $pageNumber + 1; $link = str_replace($match[0], 'p=' . $p, $link); } else { $link = str_replace(array('?' . $match[0], '&' . $match[0]), '', $link); } } } else { if ($pageNumber > 0) { $p = $pageNumber + 1; if (strpos($link, '?') !== false) { $link .= "&p=" . $p; } else { $link .= "?p=" . $p; } } } } return $link; }
<div class="block_list clb"> <div class="fontB bl_title"> <a href="<?php echo Yii::app()->createUrl("genre/index", array("type" => $type)); ?> "><?php echo mb_strtoupper('Thể loại', 'UTF-8'); ?> </a> </div> <div class="bl_item"> <table class="genretb"> <?php $i = 0; foreach ($genres as $genre) { $genreLink = URLHelper::makeUrlGenre(array("type" => $type, 'name' => $genre->name, 'id' => $genre->id)); /*if($genre->parent_id == 0) $genreLink = Yii::app()->homeUrl. 'genre#'.$genre->id;*/ if ($i % 2 == 0) { echo '<tr>'; } $hot = $new = ''; $baseUrl = Yii::app()->request->baseUrl; if ($genre->is_hot) { $hot = "<img style='margin-left: 6px;' src='" . $baseUrl . "/wap/images/hot.gif' />"; } if ($genre->is_new) { $new = "<img style='margin-left: 6px;' src='" . $baseUrl . "/wap/images/new.gif' />"; } ?> <td class="wid50">