コード例 #1
0
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use frontend\widgets\Alert;
use yii\widgets\Menu;
use yii\helpers\Url;
use app\components\PencarianMobil;
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
#print_r($artikelList);die;
$rajamobil_function = Yii::$app->rajamobil;
if (!empty($artikelList)) {
    foreach ($artikelList as $value) {
        $url = 'http://www.rajamobil.com/' . $value['cat_slug'] . "/" . date("Y/m/d/", strtotime($value['created'])) . $value['slug'] . "-" . $value['id'] . ".htm";
        $judul = $value['title'];
        /*$url = Yii::$app->urlManager->createUrl("mobil/detail",array(
          "condition" => strtolower($kondisi_kendaraan),
          "year"  =>  $year,
          "month" =>  $month,
          "day"   =>  $day,
          "slug"  =>  $slug,
          "id"=>$value["id"]));*/
        echo HTml::a($judul, $url, ['title' => $judul, 'target' => '_blank']) . '<br>';
    }
} else {
    echo 'Artikel yang anda cari tidak ada';
}
コード例 #2
0
ファイル: index.php プロジェクト: iwansusanto/jurnalrumah
><?php 
    echo HTml::a('Video Terkini', ['berita/video/video-sendiri.htm'], ['title' => 'Video Terkini']);
    ?>
</li>
                <li <?php 
    echo isset($subslug) && $subslug == "youtube" ? 'class="active"' : '';
    ?>
><?php 
    echo HTml::a('Youtube', ['berita/video/youtube.htm'], ['title' => 'Youtube']);
    ?>
</li>
                <li <?php 
    echo isset($subslug) && $subslug == "voa" ? 'class="active"' : '';
    ?>
><?php 
    echo HTml::a('VOA', ['berita/video/voa.htm'], ['title' => 'VOA']);
    ?>
</li>
            <?php 
}
?>
        </ul>
        <div class="cleaner"></div>
    </div>

    <!--
    begin
    konten kiri
    -->
    <div class="konten-kiri left">
        <?php