diff --git a/frontend/controllers/BlogController.php b/frontend/controllers/BlogController.php index 63a00fc..720748f 100755 --- a/frontend/controllers/BlogController.php +++ b/frontend/controllers/BlogController.php @@ -30,7 +30,7 @@ ->where(['status' => true]) ->orderBy([ 'sort' => SORT_ASC ]) ->all(); - $data = ArrayHelper::map($categories, 'id', 'language.title'); + $data = ArrayHelper::map($categories, 'language.alias.value', 'language.title'); $dataProvider = new ActiveDataProvider( [ 'query' => Article::find() @@ -87,14 +87,16 @@ public function actionCategory($id) { - $tags = Tag::find() - ->with( - [ - 'language', - ] - ) - ->orderBy([ 'sort' => SORT_ASC ]) - ->all(); + $categories = Category::find() + ->with( + [ + 'language', + ] + ) + ->where(['status' => true]) + ->orderBy([ 'sort' => SORT_ASC ]) + ->all(); + $data = ArrayHelper::map($categories, 'language.alias.value', 'language.title'); /** * @var Category $model @@ -138,23 +140,25 @@ return $this->render( 'category', [ - 'tags' => $tags, 'dataProvider' => $dataProvider, 'model' => $model, + 'categories' => $data ] ); } public function actionTag($id) { - $tags = Tag::find() - ->with( - [ - 'language', - ] - ) - ->orderBy([ 'sort' => SORT_ASC ]) - ->all(); + $categories = Category::find() + ->with( + [ + 'language', + ] + ) + ->where(['status' => true]) + ->orderBy([ 'sort' => SORT_ASC ]) + ->all(); + $data = ArrayHelper::map($categories, 'language.alias.value', 'language.title'); /** * @var Category $model @@ -196,9 +200,9 @@ return $this->render( 'tag', [ - 'tags' => $tags, 'dataProvider' => $dataProvider, 'model' => $model, + 'categories' => $data ] ); } diff --git a/frontend/controllers/PackageController.php b/frontend/controllers/PackageController.php index 5bb6971..96f4d45 100644 --- a/frontend/controllers/PackageController.php +++ b/frontend/controllers/PackageController.php @@ -23,11 +23,11 @@ } public function actionIndex(){ - $dataProvider = new ActiveDataProvider([ - 'query' => Package::find()->with(['language.alias'])->where(['status' => true])->orderBy('sort') - ]); + + $packages = Package::find()->with(['language.alias'])->where(['status' => true])->orderBy('sort')->all(); + return $this->render('index', [ - 'dataProvider' => $dataProvider + 'packages' => $packages ]); } } \ No newline at end of file diff --git a/frontend/views/blog/category.php b/frontend/views/blog/category.php index 23b831d..e4295ba 100755 --- a/frontend/views/blog/category.php +++ b/frontend/views/blog/category.php @@ -1,10 +1,11 @@ get('seo'); $this->params[ 'breadcrumbs' ][] = [ - 'label' => \Yii::t('app', 'Блог'), - 'url' => [ 'blog/index' ], + 'label' => \Yii::t('app', 'Блог'), + 'url' => Url::to(['blog/index']) ]; - - $this->params[ 'breadcrumbs' ][] = $seo->title; + $this->params['breadcrumbs'][] = $model->title; ?> -
+
- - - - - - - - - - - - - +
+
Блог
+
+
+
+
+
+ Подписывайтесь на наши новости + на канале FACEBOOK +
+
+
+ +
+
+ +
+
+
+
+
+ +
+ language->alias->value, ['' => 'Все рубрики']+$categories, [ + 'id' => 'blog-categories' + ])?> +
+ +
+
+
+
$dataProvider, 'itemView' => '_article', 'options' => [ - 'class' => 'col-md-9', - 'id' => 'blog-listing-medium', + 'class' => 'col-xs-12 col-sm-4 col-md-4 blog-list-col', ], 'layout' => '{items}{pager}', ] ); ?> - - - - - -
- - - -
- -
- \ No newline at end of file +
\ No newline at end of file diff --git a/frontend/views/blog/index.php b/frontend/views/blog/index.php index faa8b12..c20137a 100755 --- a/frontend/views/blog/index.php +++ b/frontend/views/blog/index.php @@ -52,7 +52,9 @@
- 'Все рубрики']+$categories)?> + 'Все рубрики']+$categories, [ + 'id' => 'blog-categories' + ])?>
diff --git a/frontend/views/blog/tag.php b/frontend/views/blog/tag.php index b96e8ca..8d6669c 100755 --- a/frontend/views/blog/tag.php +++ b/frontend/views/blog/tag.php @@ -1,115 +1,97 @@ get('seo'); $this->params[ 'breadcrumbs' ][] = [ 'label' => \Yii::t('app', 'Блог'), - 'url' => [ 'blog/index' ], + 'url' => Url::to(['blog/index']) ]; - - $this->params[ 'breadcrumbs' ][] = $seo->title; + $this->params['breadcrumbs'][] = $model->title; ?> -
+
- - - - - - - - - - - - - +
+
Блог
+
+
+
+
+
+ Подписывайтесь на наши новости + на канале FACEBOOK +
+
+
+ +
+
+ +
+
+
+
+
+ +
+ 'Все рубрики']+$categories, [ + 'id' => 'blog-categories' + ])?> +
+ +
+
+
+
$dataProvider, 'itemView' => '_article', 'options' => [ - 'class' => 'col-md-9', - 'id' => 'blog-listing-medium', + 'class' => 'col-xs-12 col-sm-4 col-md-4 blog-list-col', ], 'layout' => '{items}{pager}', ] ); ?> - - - - - -
- - - -
- -
- \ No newline at end of file +
\ No newline at end of file diff --git a/frontend/views/package/index.php b/frontend/views/package/index.php index de91523..964ccbe 100644 --- a/frontend/views/package/index.php +++ b/frontend/views/package/index.php @@ -1,8 +1,51 @@ params['breadcrumbs'][] = \Yii::t('app', 'Пакетные предложения'); - ?> \ No newline at end of file + use artbox\core\helpers\ImageHelper; + use artbox\core\helpers\Url; + + $this->params[ 'breadcrumbs'][] = \Yii::t('app', 'Пакетные предложения'); + ?> + +
+ +
diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php index a9166ec..ba52694 100755 --- a/frontend/views/site/index.php +++ b/frontend/views/site/index.php @@ -174,7 +174,7 @@ JS;