public function init() { parent::init(); if ($this->_superior = SiteModule::findOne(['site_id' => $this->siteId, 'type' => SiteModule::TYPE_MENU, 'position' => $this->position, 'status' => SiteModule::STATUS_ENABLED])) { $this->items = $this->_superior->getItems()->where(['site_id' => $this->siteId, 'status' => SiteModuleItem::STATUS_ENABLED])->orderby('list_order desc, created_at')->all(); } }
public function init() { parent::init(); $this->items = [['title' => $this->homeText, 'url' => \Yii::$app->homeUrl, 'options' => ['class' => 'home']]]; if ($this->headingText) { array_unshift($this->items, ['title' => $this->headingText, 'options' => ['class' => 'heading']]); } if (isset($this->view->params['crumbs']) && is_array($this->view->params['crumbs']) && $this->view->params['crumbs']) { $this->items = array_merge($this->items, $this->view->params['crumbs']); } }
public function init() { parent::init(); if ($this->_superior = SiteModule::findOne(['site_id' => $this->siteId, 'type' => SiteModule::TYPE_BANNER, 'position' => $this->position, 'status' => SiteModule::STATUS_ENABLED])) { $this->items = $this->_superior->getItems()->where(['site_id' => $this->siteId, 'status' => SiteModuleItem::STATUS_ENABLED])->orderby('list_order desc, created_at')->all(); } if ($this->items && $this->carousel) { $this->options['id'] = $this->randomId; $this->view->registerJs("\$('#{$this->randomId}').carousel();", 3); } }
$this->params['crumbs'] = [['title' => $this->title]]; ?> <div class="container"> <div class="row"> <div class="col-xs-9 col-xs-push-3"> <?php echo Crumbs::widget(['headingText' => \Yii::t($module->messageCategory, 'current location') . ':', 'homeText' => \Yii::t($module->messageCategory, 'home'), 'options' => ['class' => 'x-crumbs']]); ?> </div> </div> <div class="x-crumbs-arc x-wave x-wave-top-convex x-wave-bottom-concave"></div> <div class="row"> <div class="col-xs-3"> <?php echo Menu::widget(['siteId' => $module->siteId, 'position' => 'List_categorys', 'headingEnabled' => true, 'options' => ['class' => 'x-sidebar']]); ?> </div> <div class="col-xs-9 x-height-min"> <?php echo Ul::widget(['items' => $items, 'timeEnabled' => $superior['type'] != 5, 'download' => $superior['type'] == 5 ? 'attachment_id' : false, 'downloadText' => \Yii::t($module->messageCategory, 'download'), 'options' => ['class' => 'x-list x-list-' . $superior['type']]]); ?> <div class="x-pagination"> <?php echo LinkPager::widget(['pagination' => $pagination, 'prevPageLabel' => '<', 'nextPageLabel' => '>', 'firstPageLabel' => '«', 'lastPageLabel' => '»']); ?> </div> </div> </div> </div>