From f2acc39351b2aa2c4102b83c5754a07b3bc54b15 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 21 Oct 2016 15:15:56 +0300 Subject: [PATCH] -Seo widget integration --- backend/views/blog-category/_form.php | 11 ++++++++++- common/models/BlogCategory.php | 14 +++++++++++++- console/migrations/m161021_094522_seo_to_blog_migration.php | 22 ++++++++++++++++++++++ frontend/views/article/index.php | 79 ++++++++++++++++++++++++++++++++++++++++--------------------------------------- frontend/views/article/view.php | 32 +++++++++++++++++--------------- frontend/views/blog/category.php | 6 ++++-- frontend/views/blog/index.php | 63 ++++++++++++++++++++++++++++++++------------------------------- frontend/views/blog/view.php | 6 ++++-- frontend/views/catalog/_product_list.php | 3 --- frontend/views/catalog/products.php | 155 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------- frontend/views/catalog/view.php | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------- frontend/views/category/brand.php | 57 ++++++++++++++++++++++++++++++++------------------------- frontend/views/category/collection.php | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------- frontend/views/category/index.php | 61 ++++++++++++++++++++++++++++++++----------------------------- frontend/views/comments/index.php | 5 +++-- frontend/views/discount/discount.php | 64 +++++++++++++++++++++++++++++++++------------------------------- frontend/views/discount/empty.php | 3 ++- frontend/views/new-collections/index.php | 84 ++++++++++++++++++++++++++++++++++++++++++------------------------------------------ frontend/views/product/index.php | 38 ++++++++++++++++++++------------------ frontend/views/site/page.php | 27 ++++++++++++++------------- frontend/web/js/script.js | 4 ++-- 21 files changed, 514 insertions(+), 435 deletions(-) create mode 100644 console/migrations/m161021_094522_seo_to_blog_migration.php diff --git a/backend/views/blog-category/_form.php b/backend/views/blog-category/_form.php index f9b4fbb..ca62608 100755 --- a/backend/views/blog-category/_form.php +++ b/backend/views/blog-category/_form.php @@ -13,7 +13,16 @@ use yii\widgets\ActiveForm; field($model, 'name')->textInput(['maxlength' => true]) ?> - + + field($model, 'meta_title')->textInput(['maxlength' => true]) ?> + + field($model, 'meta_desc')->textInput(['maxlength' => true]) ?> + + field($model, 'seo_text')->textInput(['maxlength' => true]) ?> + + field($model, 'h1')->textInput(['maxlength' => true]) ?> + +
isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
diff --git a/common/models/BlogCategory.php b/common/models/BlogCategory.php index e408702..11392e0 100755 --- a/common/models/BlogCategory.php +++ b/common/models/BlogCategory.php @@ -8,6 +8,12 @@ * Class BlogCategory * @package common\models * @property Blog[] $blogs + * @property string $name + * @property integer $id + * @property string $meta_title + * @property string $meta_desc + * @property string $seo_text + * @property string $h1 */ class BlogCategory extends ActiveRecord { @@ -20,7 +26,13 @@ { return [ [ - [ 'name' ], + [ + 'name', + 'meta_title', + 'meta_desc', + 'seo_text', + 'h1', + ], 'string', ], ]; diff --git a/console/migrations/m161021_094522_seo_to_blog_migration.php b/console/migrations/m161021_094522_seo_to_blog_migration.php new file mode 100644 index 0000000..d276627 --- /dev/null +++ b/console/migrations/m161021_094522_seo_to_blog_migration.php @@ -0,0 +1,22 @@ +addColumn('blog_category', 'meta_title', $this->string(255)); + $this->addColumn('blog_category', 'meta_desc', $this->string(255)); + $this->addColumn('blog_category', 'seo_text', $this->string(255)); + $this->addColumn('blog_category', 'h1', $this->string(255)); + } + + public function down() + { + $this->dropColumn('blog_category', 'h1'); + $this->dropColumn('blog_category', 'seo_text'); + $this->dropColumn('blog_category', 'meta_desc'); + $this->dropColumn('blog_category', 'meta_title'); + } +} diff --git a/frontend/views/article/index.php b/frontend/views/article/index.php index cd9aebe..c542206 100755 --- a/frontend/views/article/index.php +++ b/frontend/views/article/index.php @@ -1,47 +1,48 @@ title = "События"; -$this->params[ 'breadcrumbs' ][] = $this->title; + + use common\modules\product\models\Category; + use yii\data\ActiveDataProvider; + use yii\web\View; + use yii\widgets\ListView; + use common\widgets\Seo; + + /** + * @var Category $category + * @var ActiveDataProvider $dataProvider + * @var View $this + */ + $this->params[ 'seo' ][ Seo::TITLE ] = "События"; + $this->params[ 'breadcrumbs' ][] = 'События'; ?>
- - + + $dataProvider, - 'options' => [ - 'tag' => false, - ], - 'pager' => [ - 'prevPageCssClass' => 'left_pg', - 'nextPageCssClass' => 'right_pg', - 'activePageCssClass' => 'active', - 'disabledPageCssClass' => '', - 'firstPageLabel' => false, -// 'nextPageLabel' => - ], - 'itemView' => '_article_item', - 'layout' => '{items}{pager}', - ]); + echo ListView::widget([ + 'dataProvider' => $dataProvider, + 'options' => [ + 'tag' => false, + ], + 'pager' => [ + 'prevPageCssClass' => 'left_pg', + 'nextPageCssClass' => 'right_pg', + 'activePageCssClass' => 'active', + 'disabledPageCssClass' => '', + 'firstPageLabel' => false, + // 'nextPageLabel' => + ], + 'itemView' => '_article_item', + 'layout' => '{items}{pager}', + ]); ?> - - - - - - - - + + + + + + + +
diff --git a/frontend/views/article/view.php b/frontend/views/article/view.php index 9b5b5ec..4382466 100755 --- a/frontend/views/article/view.php +++ b/frontend/views/article/view.php @@ -1,19 +1,21 @@ title = $model->title; -$this->params[ 'breadcrumbs' ][] = [ - 'label' => "События", - 'url' => Url::to(['article/index']), -]; -$this->params[ 'breadcrumbs' ][] = $this->title; + + /** + * @var Articles $model + * @var View $this + */ + use common\models\Articles; + use yii\web\View; + use yii\helpers\Url; + use common\widgets\Seo; + + $this->params[ 'seo' ][ Seo::TITLE ] = $model->title; + $this->params[ 'seo' ][ Seo::DESCRIPTION ] = ''; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => "События", + 'url' => Url::to([ 'article/index' ]), + ]; + $this->params[ 'breadcrumbs' ][] = $model->title; ?>
diff --git a/frontend/views/blog/category.php b/frontend/views/blog/category.php index 25108fa..d0eb65c 100755 --- a/frontend/views/blog/category.php +++ b/frontend/views/blog/category.php @@ -5,20 +5,22 @@ use yii\helpers\Url; use yii\web\View; use yii\widgets\ListView; + use common\widgets\Seo; /** * @var BlogCategory $model * @var ActiveDataProvider $dataProvider * @var View $this */ - $this->title = $model->name; + $this->params['seo'][Seo::TITLE] = !empty($model->meta_title) ? $model->meta_title : $model->name; + $this->params['seo'][Seo::DESCRIPTION] = !empty($model->meta_desc) ? $model->meta_desc : ''; $this->params[ 'breadcrumbs' ][] = [ 'label' => 'Блог', 'url' => Url::to([ '/blog' ]), ]; - $this->params[ 'breadcrumbs' ][] = $this->title; + $this->params[ 'breadcrumbs' ][] = $model->name; ?>
diff --git a/frontend/views/blog/index.php b/frontend/views/blog/index.php index e9104ef..91b0337 100755 --- a/frontend/views/blog/index.php +++ b/frontend/views/blog/index.php @@ -1,39 +1,40 @@ title = "Блог"; -$this->params[ 'breadcrumbs' ][] = $this->title; + + use common\modules\product\models\Category; + use yii\data\ActiveDataProvider; + use yii\web\View; + use yii\widgets\ListView; + use common\widgets\Seo; + + /** + * @var Category $category + * @var ActiveDataProvider $dataProvider + * @var View $this + */ + $this->params[ 'seo' ][ Seo::TITLE ] = "Блог"; + $this->params[ 'breadcrumbs' ][] = 'Блог'; ?>
$dataProvider, - 'options' => [ - 'tag' => false, - ], - 'pager' => [ - 'prevPageCssClass' => 'left_pg', - 'nextPageCssClass' => 'right_pg', - 'activePageCssClass' => 'active', - 'disabledPageCssClass' => '', - 'firstPageLabel' => false, -// 'nextPageLabel' => - ], - 'itemView' => '_blog_item', - 'layout' => '{items}{pager}', - ]); - + + echo ListView::widget([ + 'dataProvider' => $dataProvider, + 'options' => [ + 'tag' => false, + ], + 'pager' => [ + 'prevPageCssClass' => 'left_pg', + 'nextPageCssClass' => 'right_pg', + 'activePageCssClass' => 'active', + 'disabledPageCssClass' => '', + 'firstPageLabel' => false, + // 'nextPageLabel' => + ], + 'itemView' => '_blog_item', + 'layout' => '{items}{pager}', + ]); + ?>
diff --git a/frontend/views/blog/view.php b/frontend/views/blog/view.php index acaac25..e9a3ff5 100755 --- a/frontend/views/blog/view.php +++ b/frontend/views/blog/view.php @@ -9,14 +9,16 @@ use common\modules\comment\widgets\CommentWidget; use yii\helpers\Url; use yii\web\View; + use common\widgets\Seo; $this->title = $model->title; - + $this->params[ 'seo' ][ Seo::TITLE ] = $model->title; + $this->params[ 'seo' ][ Seo::DESCRIPTION ] = ''; $this->params[ 'breadcrumbs' ][] = [ 'label' => 'Блог', 'url' => Url::to([ '/blog' ]), ]; - $this->params[ 'breadcrumbs' ][] = $this->title; + $this->params[ 'breadcrumbs' ][] = $model->title; ?> diff --git a/frontend/views/catalog/_product_list.php b/frontend/views/catalog/_product_list.php index e3843d2..faba56b 100755 --- a/frontend/views/catalog/_product_list.php +++ b/frontend/views/catalog/_product_list.php @@ -22,9 +22,6 @@ use yii\widgets\ListView; 'variant' => $model->variant->sku, ])?>">
- getImageUrl(), 'product_list_item', ['class' => 'picture']); - ?>
name; ?>
variant->sku; ?>
diff --git a/frontend/views/catalog/products.php b/frontend/views/catalog/products.php index 303417c..9f6df68 100755 --- a/frontend/views/catalog/products.php +++ b/frontend/views/catalog/products.php @@ -1,92 +1,97 @@ title = $category->first_text; -$this->params['breadcrumbs'][] = $this->title; + + /** + * @var ActiveDataProvider $dataProvider + * @var View $this + * @var ActiveDataProvider $productsProvider + * @var Category $category + * @var Category[] $stockProgram + * @var Category[] $onOrder + */ + use common\modules\product\models\Category; + use yii\data\ActiveDataProvider; + use yii\helpers\Url; + use yii\web\View; + use yii\widgets\ListView; + use frontend\widgets\FilterWidget; + use common\widgets\Seo; + + $this->params[ 'seo' ][ Seo::TITLE ] = $category->first_text; + $this->params[ 'seo' ][ Seo::DESCRIPTION ] = ''; + $this->params[ 'breadcrumbs' ][] = $category->first_text; ?>
-
- -
-
- Складская программа -
- +
+ + -
- Под заказ -
- + +
Фильтры
+
+
+
+ $category, + 'groups' => $groups, + 'filter' => $filter, + ]) ?>
-
Фильтры
-
-
-
- $category, - 'groups'=> $groups, - 'filter'=> $filter, - ])?>
-
-
-
- - $productsProvider, - 'itemView' => '_product_list', - 'layout' => '{items}{pager}', - ])?> - +
+
+ + $productsProvider, + 'itemView' => '_product_list', + 'layout' => '{items}{pager}', + ]) ?> + +
-
-
Стильные элитные обои для вашего дома.
+

Seo::H1]); ?>

-
Продумывая дизайн своей квартиры, мы непременно тщательно выбираем «одежду» для стен — красивые модные обои.
+
Seo::SEO_TEXT]); ?>
Узнать больше diff --git a/frontend/views/catalog/view.php b/frontend/views/catalog/view.php index c407321..e31c482 100755 --- a/frontend/views/catalog/view.php +++ b/frontend/views/catalog/view.php @@ -1,54 +1,56 @@ title = $product->name; -$this->params['breadcrumbs'][] = [ - 'label' => $product->category->parent->parent->name, - 'url' => Url::to([ - 'category/index', - 'id' => $product->category->parent->parent->category_id, - ]), -]; -$this->params['breadcrumbs'][] = [ - 'label' => $product->category->parent->name, - 'url' => Url::to([ - 'category/brand', - 'id' => $product->category->parent->category_id, - ]), -]; -$this->params['breadcrumbs'][] = [ - 'label' => $product->category->name, - 'url' => Url::to([ - 'category/collection', - 'id' => $product->category->category_id, - ]), -]; -$this->params['breadcrumbs'][] = $this->title; + /** + * @var Product $product + * @var ProductVariant $variant + * @var View $this + * @var ProductVariant[] $variants + * @var array $attributes + */ + use common\components\artboximage\ArtboxImageHelper; + use common\modules\product\models\Product; + use common\modules\product\models\ProductVariant; + use yii\helpers\Html; + use yii\helpers\Url; + use yii\web\View; + use yii\widgets\Pjax; + use common\widgets\Seo; + + $this->title = $product->name; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $product->category->parent->parent->name, + 'url' => Url::to([ + 'category/index', + 'id' => $product->category->parent->parent->category_id, + ]), + ]; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $product->category->parent->name, + 'url' => Url::to([ + 'category/brand', + 'id' => $product->category->parent->category_id, + ]), + ]; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $product->category->name, + 'url' => Url::to([ + 'category/collection', + 'id' => $product->category->category_id, + ]), + ]; + $this->params[ 'breadcrumbs' ][] = $product->name; + $this->params[ 'seo' ][ Seo::TITLE ] = $product->name; ?> 'pjax-reload', + 'id' => 'pjax-reload', 'timeout' => 5000, ]); ?>
getImageUrl(), 'product_main'); + echo ArtboxImageHelper::getImage($variant->getImageUrl(), 'product_main'); ?>
@@ -56,14 +58,16 @@ $this->params['breadcrumbs'][] = $this->title;
name; ?>
category->name; ?>
category->parent->name; ?>
- +
  • Артикул: sku; ?>
  • $options) { ?> -
  • :
  • - $options) { ?> +
  • + : +
  • +
@@ -72,17 +76,17 @@ $this->params['breadcrumbs'][] = $this->title;
-
- getImageUrl(), 'product_variant_main'), [ - 'catalog/product', - 'product' => $product->alias, - 'variant' => $oneVariant->sku, - ]); - ?> -
- + foreach($variants as $oneVariant) { + ?> +
+ getImageUrl(), 'product_variant_main'), [ + 'catalog/product', + 'product' => $product->alias, + 'variant' => $oneVariant->sku, + ]); + ?> +
+
diff --git a/frontend/views/category/brand.php b/frontend/views/category/brand.php index 3dc86a7..d704537 100755 --- a/frontend/views/category/brand.php +++ b/frontend/views/category/brand.php @@ -1,20 +1,27 @@ title = $category->name; -$this->params[ 'breadcrumbs' ][] = [ - 'label' => $category->parent->name, - 'url' => ['category/index', 'id' => $category->parent->category_id], -]; -$this->params[ 'breadcrumbs' ][] = $this->title; + use common\modules\product\models\Category; + use yii\data\ActiveDataProvider; + use yii\web\View; + use yii\widgets\ListView; + use common\widgets\Seo; + + /** + * @var Category $category + * @var ActiveDataProvider $dataProvider + * @var View $this + */ + $this->params[ 'seo' ][ Seo::TITLE ] = !empty( $category->meta_title ) ? $category->meta_title : $category->name; + $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty( $category->meta_desc ) ? $category->meta_desc : ''; + $this->params[ 'seo' ][ Seo::SEO_TEXT ] = !empty( $category->seo_text ) ? $category->seo_text : ''; + $this->params[ 'seo' ][ Seo::H1 ] = !empty( $category->h1 ) ? $category->h1 : $category->name; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $category->parent->name, + 'url' => [ + 'category/index', + 'id' => $category->parent->category_id, + ], + ]; + $this->params[ 'breadcrumbs' ][] = $category->name; ?> @@ -24,19 +31,19 @@ $this->params[ 'breadcrumbs' ][] = $this->title;
first_text; ?>
second_text; ?>
- + $dataProvider, - 'itemView' => '_brand_item', - 'layout' => '{items}', - ]) + echo ListView::widget([ + 'dataProvider' => $dataProvider, + 'itemView' => '_brand_item', + 'layout' => '{items}', + ]) ?> - +
-
h1; ?>
+

Seo::H1]); ?>

-
seo_text; ?>
+
Seo::SEO_TEXT]); ?>
Узнать больше diff --git a/frontend/views/category/collection.php b/frontend/views/category/collection.php index 3ff1d73..8bd92bd 100755 --- a/frontend/views/category/collection.php +++ b/frontend/views/category/collection.php @@ -1,69 +1,74 @@ title = $category->name; -$this->params['breadcrumbs'][] = [ - 'label' => $category->parent->parent->name, - 'url' => Url::to([ - 'category/index', - 'id' => $category->parent->parent->category_id, - ]), -]; -$this->params['breadcrumbs'][] = [ - 'label' => $category->parent->name, - 'url' => Url::to([ - 'category/brand', - 'id' => $category->parent->category_id, - ]), -]; -$this->params['breadcrumbs'][] = $this->title; + /** + * @var Product[][] $products + * @var View $this + * @var Category $category + */ + use common\components\artboximage\ArtboxImageHelper; + use common\modules\product\models\Category; + use common\modules\product\models\Product; + use yii\web\View; + use yii\helpers\Url; + use common\widgets\Seo; + + $this->params[ 'seo' ][ Seo::TITLE ] = !empty( $category->meta_title ) ? $category->meta_title : $category->name; + $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty( $category->meta_desc ) ? $category->meta_desc : ''; + $this->params[ 'seo' ][ Seo::SEO_TEXT ] = !empty( $category->seo_text ) ? $category->seo_text : ''; + $this->params[ 'seo' ][ Seo::H1 ] = !empty( $category->h1 ) ? $category->h1 : $category->name; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $category->parent->parent->name, + 'url' => Url::to([ + 'category/index', + 'id' => $category->parent->parent->category_id, + ]), + ]; + $this->params[ 'breadcrumbs' ][] = [ + 'label' => $category->parent->name, + 'url' => Url::to([ + 'category/brand', + 'id' => $category->parent->category_id, + ]), + ]; + $this->params[ 'breadcrumbs' ][] = $category->name; ?>
name; ?>
first_text; ?>
-

meta_desc; ?>

+

second_text; ?>

-
seo_text; ?>
+
Seo::SEO_TEXT]); ?>
Узнать больше diff --git a/frontend/views/category/index.php b/frontend/views/category/index.php index edaadee..3fad488 100755 --- a/frontend/views/category/index.php +++ b/frontend/views/category/index.php @@ -1,36 +1,39 @@ params[ 'seo' ][ 'title' ] = !empty($category->meta_title) ? $category->meta_title : $category->name; -$this->title = $category->name; -$this->params[ 'breadcrumbs' ][] = $this->title; - -echo ListView::widget([ - 'dataProvider' => $dataProvider, - 'options' => [ - 'class' => 'blocks_2', - ], - 'itemView' => '_category_item', - 'layout' => '{items}', -]); + use common\modules\product\models\Category; + use common\widgets\Seo; + use yii\data\ActiveDataProvider; + use yii\web\View; + use yii\widgets\ListView; + + /** + * @var Category $category + * @var ActiveDataProvider $dataProvider + * @var View $this + */ + $this->params[ 'seo' ][ Seo::TITLE ] = !empty( $category->meta_title ) ? $category->meta_title : $category->name; + $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty( $category->meta_desc ) ? $category->meta_desc : ''; + $this->params[ 'seo' ][ Seo::SEO_TEXT ] = !empty( $category->seo_text ) ? $category->seo_text : ''; + $this->params[ 'seo' ][ Seo::H1 ] = !empty( $category->h1 ) ? $category->h1 : $category->name; + $this->params[ 'breadcrumbs' ][] = $category->name; + + echo ListView::widget([ + 'dataProvider' => $dataProvider, + 'options' => [ + 'class' => 'blocks_2', + ], + 'itemView' => '_category_item', + 'layout' => '{items}', + ]); ?>
-
h1; ?>
-
-
seo_text; ?>
-
- +

Seo::H1]); ?>

+
+
Seo::SEO_TEXT]); ?>
+
+
diff --git a/frontend/views/comments/index.php b/frontend/views/comments/index.php index d407ef6..ea04cb1 100755 --- a/frontend/views/comments/index.php +++ b/frontend/views/comments/index.php @@ -6,9 +6,10 @@ use common\models\Comments; use common\modules\comment\widgets\CommentWidget; use yii\web\View; + use common\widgets\Seo; - $this->title = 'Отзывы'; - $this->params['breadcrumbs'][] = $this->title; + $this->params[ 'seo' ][ Seo::TITLE ] = 'Отзывы'; + $this->params['breadcrumbs'][] = 'Отзывы'; ?> diff --git a/frontend/views/discount/discount.php b/frontend/views/discount/discount.php index 4c9acc0..d43e6cc 100755 --- a/frontend/views/discount/discount.php +++ b/frontend/views/discount/discount.php @@ -1,15 +1,16 @@ title = 'Акции'; -$this->params['breadcrumbs'][] = $this->title; + $this->params[ 'breadcrumbs' ][] = 'Акции'; + $this->params[ 'seo' ][ Seo::TITLE ] = 'Акции'; ?> @@ -17,32 +18,33 @@ $this->params['breadcrumbs'][] = $this->title;
Акции
- - +
-
Стильные элитные обои для вашего дома
+

Seo::H1]);?>

-
Продумывая дизайн своей квартиры, мы непременно тщательно выбираем "одежду" для стен - красивые модные обои.
+
Seo::SEO_TEXT]);?>
Узнать больше diff --git a/frontend/views/discount/empty.php b/frontend/views/discount/empty.php index ff58473..ca9bb7a 100755 --- a/frontend/views/discount/empty.php +++ b/frontend/views/discount/empty.php @@ -7,4 +7,5 @@ use yii\web\View; $this->title = 'Акции'; $this->params['breadcrumbs'][] = $this->title; -echo "Товары не найдены"; \ No newline at end of file +echo "Товары не найдены"; + \ No newline at end of file diff --git a/frontend/views/new-collections/index.php b/frontend/views/new-collections/index.php index 909974e..2100320 100755 --- a/frontend/views/new-collections/index.php +++ b/frontend/views/new-collections/index.php @@ -1,45 +1,45 @@ title = 'Новые коллекции'; -$this->params[ 'breadcrumbs' ][] = $this->title; + use common\modules\product\models\Category; + use yii\data\ActiveDataProvider; + use yii\web\View; + use yii\widgets\ListView; + use common\widgets\Seo; + + /** + * @var Category $category + * @var ActiveDataProvider $dataProvider + * @var View $this + */ + $this->params[ 'seo' ][ Seo::TITLE ] = 'Новые коллекции'; + $this->params[ 'breadcrumbs' ][] = 'Новые коллекции'; ?>
-
-
Новые коллекции в Baccara Home
-
- $dataProvider, - 'itemOptions' => [ - 'tag' => false, - ], - 'itemView' => '_new_collections_item', - 'layout' => '{items}', - ]); - ?> - count > 6) { ?> - - -
-
-
-
Стильные элитные обои для вашего дома.
-
-
Продумывая дизайн своей квартиры, мы непременно тщательно выбираем «одежду» для стен — красивые модные обои.
-
- -
-
\ No newline at end of file +
+
Новые коллекции в Baccara Home
+
+ $dataProvider, + 'itemOptions' => [ + 'tag' => false, + ], + 'itemView' => '_new_collections_item', + 'layout' => '{items}', + ]); + ?> + count > 6) { ?> + + +
+
+
+
+
Seo::SEO_TEXT]); ?>
+
+ +
+
\ No newline at end of file diff --git a/frontend/views/product/index.php b/frontend/views/product/index.php index a0f3706..62c0859 100755 --- a/frontend/views/product/index.php +++ b/frontend/views/product/index.php @@ -1,17 +1,19 @@ title = $category->first_text; -$this->params['breadcrumbs'][] = $this->title; + + /** + * @var ActiveDataProvider $dataProvider + * @var View $this + * @var Category $category + */ + use common\modules\product\models\Category; + use yii\data\ActiveDataProvider; + use yii\web\View; + use yii\widgets\ListView; + use common\widgets\Seo; + + $this->params[ 'seo' ][ Seo::TITLE ] = !empty($category->meta_title) ? $category->meta_title : $category->first_text; + $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty($category->meta_desc) ? $category->meta_desc : ''; + $this->params[ 'breadcrumbs' ][] = $category->first_text; ?> @@ -198,13 +200,13 @@ $this->params['breadcrumbs'][] = $this->title;
- + $dataProvider, - 'itemView' => '_product_list', - 'layout' => '{items}{pager}', - ])?> - + 'itemView' => '_product_list', + 'layout' => '{items}{pager}', + ]) ?> +
diff --git a/frontend/views/site/page.php b/frontend/views/site/page.php index 54fa21a..aa166d8 100755 --- a/frontend/views/site/page.php +++ b/frontend/views/site/page.php @@ -1,14 +1,15 @@ title = $model->title; -$this->params['breadcrumbs'][] = $this->title; - -echo $model->body; \ No newline at end of file + use common\models\Page; + use yii\web\View; + use common\widgets\Seo; + + /** + * @var Page $model + * @var View $this + */ + + $this->params[ 'seo' ][ Seo::TITLE ] = !empty($model->meta_title) ? $model->meta_title : $model->title; + $this->params[ 'seo' ][ Seo::DESCRIPTION ] = !empty($model->meta_description) ? $model->meta_description : ''; + $this->params[ 'breadcrumbs' ][] = $model->title; + + echo $model->body; \ No newline at end of file diff --git a/frontend/web/js/script.js b/frontend/web/js/script.js index 3410a97..82ddbd4 100755 --- a/frontend/web/js/script.js +++ b/frontend/web/js/script.js @@ -18,7 +18,7 @@ $(document).ready( if($(this).hasClass('opened')) { $('.more a').text('Узнать больше'); } else { - $('.more a').text('Скрыть'); + $('.more a').text('Свернуть'); } $(this).toggleClass('opened'); return false; @@ -112,7 +112,7 @@ $(document).ready( event.preventDefault(); if($(".simple-spoiler").hasClass("just-closed")) { - $('.just-more a').text("Скрыть"); + $('.just-more a').text("Свернуть"); $('.simple-spoiler').animate({height : spoilerFullHeight}, 1000); } else { -- libgit2 0.21.4