registerMetaTag([ 'name' => 'robots', 'content' => 'noindex, nofollow', ]); AppAsset::register($this); /** * @var Page[] $pages */ $pages = Page::find() ->where([ 'in_menu' => true ]) ->orderBy([ 'id' => SORT_DESC ]) ->all(); $pages_items = []; foreach($pages as $page) { $pages_items[] = [ 'label' => $page->title, 'url' => [ 'site/page', 'id' => $page->id, ], ]; } $categories = Category::find() ->where([ 'depth' => 0 ]) ->all(); $submenu_items = []; foreach($categories as $category) { $submenu_items[] = [ 'label' => $category->name, 'url' => [ 'filter/category', 'id' => $category->category_id, ], ]; } $menu_items = [ [ 'label' => 'Контрактные продукты', 'url' => '#', 'items' => $submenu_items, ], [ 'label' => 'Галерея объектов', 'url' => [ '/project' ], ], [ 'label' => 'Статьи', 'url' => [ '/article' ], ], [ 'label' => 'Контакты', 'url' => [ 'site/contact' ], ], ]; array_splice($menu_items, 1, 0, $pages_items); ?> beginPage() ?>
= Html::csrfMetaTags() ?>поиск