registerMetaTag([ 'name' => 'robots', 'content' => 'noindex, nofollow', ]); AppAsset::register($this); /** * @var Page[] $pages */ $pages = Page::find() ->joinWith('lang', true, 'INNER JOIN') ->where([ 'in_menu' => true ]) ->orderBy([ 'id' => SORT_DESC ]) ->all(); $pages_items = []; foreach($pages as $page) { $pages_items[] = [ 'label' => $page->lang->title, 'url' => [ 'site/page', 'id' => $page->id, ], ]; } $categories = Category::find() ->joinWith('lang', true, 'INNER JOIN') ->where([ 'depth' => 0 ]) ->all(); $submenu_items = []; foreach($categories as $category) { $submenu_items[] = [ 'label' => $category->lang->name, 'url' => [ 'filter/category', 'id' => $category->category_id, ], ]; } $menu_items = [ [ 'label' => Yii::t('app', 'Контрактные продукты'), 'url' => '#', 'items' => $submenu_items, ], [ 'label' => Yii::t('app', 'Галерея объектов'), 'url' => [ '/project' ], ], [ 'label' => Yii::t('app', 'Статьи'), 'url' => [ '/article' ], ], [ 'label' => Yii::t('app', 'Контакты'), 'url' => [ 'site/contact' ], ], ]; array_splice($menu_items, 1, 0, $pages_items); ?> beginPage() ?> <?= Html::encode($this->title) ?> head() ?> beginBody() ?>
[ 'class' => 'main-menu', ], 'items' => $menu_items, ]); ?>
'question-form visible-md visible-lg hidden', ]); ?>
'logo_', ]) ?>
endBody() ?> endPage() ?>