Example #1
0
 public function init()
 {
     $items = [['label' => 'Главная', 'url' => '/']];
     $page = Page::find()->one();
     if ($page) {
         $items[] = ['label' => 'О компании', 'url' => ['site/page', 'slug' => $page->slug]];
     }
     foreach (Article::tree() as $articleCategory) {
         $item['label'] = $articleCategory->title;
         if (count($articleCategory->children) > 0) {
             $item['url'] = ['site/article', 'category' => $articleCategory->children[0]->slug];
         } else {
             $item['url'] = ['site/article', 'category' => $articleCategory->slug];
         }
         $items[] = $item;
     }
     $items[] = ['label' => 'Новостная лента', 'url' => ['site/news']];
     $this->items = $items;
 }
Example #2
0
echo $page->title;
?>
</h1>
<div class="clearfix pad_top13">
    <div class="col-md-8">
        <p class="row">
            <span class="bold">Specializes in Non-veg , 65, Thanthuri, Sandwich, 65 smoked sandwich.</span><br/><br/> Our team of highly qualified professionals headed by an experienced Chef. Lnim ad minim veniam, quis nostrud.<br /><br />

            Exercitation ullamco laboris nisi ut aliquip ex ea commodo. Duis aute dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla  do tempore ercitationem ut labore. et dolore magna aliqua.<br /><br />

            Ut labore et dolore magna aliqua. Ut enim ad consequatur quis nostrud exercitation ullamco. Exercitationem ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adi pisi cing elit, sed do eiusmod tempor.							</p>
    </div>
    <div class="col-md-4">
        <div class="right_content ">
            <div class="sub_title">
                <h4><?php 
echo $page->title;
?>
</h4>
            </div>

            <ul>
                <?php 
foreach (Article::tree() as $node) {
    echo renderNode($node);
}
?>
            </ul>
        </div>
    </div>
</div>