<?php /* @var $this yii\web\View */ $this->registerCssFile('@web/css/category.css', ['depends' => \frontend\assets\AppAsset::className()]); $arrayPath = \common\models\Category::getCatalogPath($model->id, $allCategory); array_pop($arrayPath); foreach ($arrayPath as $path) { $category = \common\models\Category::findOne($path); $this->params['breadcrumbs'][] = ['label' => $category->name, 'url' => ['/category/view', 'id' => $category->id]]; } $this->params['breadcrumbs'][] = $model->name; $rootId = \common\models\Category::getRootCatalogId($model->id, $allCategory); $this->title = $model->name; ?> <div id="wrapper"> <!-- main body --> <?php echo \yii\widgets\Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'options' => ['class' => 'here cle'], 'tag' => 'div', 'itemTemplate' => ' > {link}', 'activeItemTemplate' => ' > {link}']); ?> <div class="main cle"> <!-- left --> <div class="sidebar"> <div class="cate-menu" id="cate-menu"> <h3><a href="<?php echo Yii::$app->urlManager->createUrl(['category/view', 'id' => $rootId]); ?> "><strong><?php echo $arrayCategoryIdName[$rootId]; ?>