コード例 #1
0
ファイル: _gallery.php プロジェクト: secondsano/mebel
<?php

use yii\widgets\Menu;
use yii\widgets\Pjax;
use app\helpers\MenuHelper;
use app\helpers\Html;
use app\helpers\ProductHelper;
use app\assets\FotoramaAsset;
use app\assets\GalleryAsset;
FotoramaAsset::register($this);
GalleryAsset::register($this);
$app = Yii::$app;
?>

<?php 
Pjax::begin();
?>

<article id="gallery" class="page-block page-block_height_auto">
    <h2 class="page-block__title color-scheme-5"> Каталог мягкой мебели </h2>
    <hr />
    <div class="color-scheme-3 page-block__body page-block_height_auto__body page-block__body_padding">
        <div class="container gallery">
            <div class="gallery__aside">
                <div class="gallery__logo">  </div>
                <?php 
$items = MenuHelper::prepareMenu($groups, 'site/index', 'group');
if (!$app->request->getQueryParam('group')) {
    $items[0]['active'] = true;
}
echo Menu::widget(['items' => $items, 'options' => ['class' => 'gallery__menu'], 'activeCssClass' => 'gallery__menu-layout_active', 'itemOptions' => ['class' => 'gallery__menu-layout'], 'linkTemplate' => '<a href="{url}" class="gallery__menu-link">{label}</a>']);
コード例 #2
0
ファイル: main.php プロジェクト: egor-pisarev/merro
<?php

use yii\helpers\Html;
if (Yii::$app->controller->action->id == 'gallery') {
    $asset = \app\assets\GalleryAsset::register($this);
} else {
    $asset = \app\assets\AppAsset::register($this);
}
$this->beginPage();
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo Yii::$app->language;
?>
">
    <head>
        <meta charset="<?php 
echo Yii::$app->charset;
?>
">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <?php 
echo Html::csrfMetaTags();
?>
        <title><?php 
echo Html::encode($this->title);
?>
</title>
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
        <link rel="shortcut icon" href="<?php 
echo $asset->baseUrl;