From 9ce693a7a54478915c61849e26654edb8726ad87 Mon Sep 17 00:00:00 2001 From: yarik Date: Mon, 20 Mar 2017 12:48:43 +0200 Subject: [PATCH] Products seo text --- frontend/views/catalog/products.php | 7 +------ frontend/widgets/Seo.php | 14 +++++++------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/frontend/views/catalog/products.php b/frontend/views/catalog/products.php index a87181f..d7594d8 100755 --- a/frontend/views/catalog/products.php +++ b/frontend/views/catalog/products.php @@ -3,13 +3,9 @@ /** @var $this \yii\web\View */ /** @var $productProvider \yii\data\ActiveDataProvider */ - use common\modules\product\models\Product; - use yii\helpers\ArrayHelper; use yii\helpers\Html; use yii\helpers\Url; - use yii\widgets\Breadcrumbs; use yii\web\View; - use common\modules\product\helpers\ProductHelper; use common\modules\product\helpers\FilterHelper; use frontend\widgets\Seo; //$this->title = $category->categoryName->value; @@ -236,10 +232,9 @@ $this->registerJsFile(Yii::getAlias('@web/js/ion.rangeSlider.js'),[ $seo_text = Seo::widget([ 'row'=>'seo_text']); if($seo_text){ ?> -
+ \ No newline at end of file diff --git a/frontend/widgets/Seo.php b/frontend/widgets/Seo.php index 0c783ef..0c358af 100755 --- a/frontend/widgets/Seo.php +++ b/frontend/widgets/Seo.php @@ -127,7 +127,7 @@ class Seo extends Widget $title = $this->selectSeoData(self::TITLE, $priority); - + if(!empty($filter) && isset($this->fields['meta-title']) && $title == $this->fields['meta-title']) { @@ -146,8 +146,8 @@ class Seo extends Widget } } - - + + foreach(self::$optionsList as $optionList){ @@ -165,13 +165,13 @@ class Seo extends Widget } - + } - + $title_string = $this->getTitleString($array); - + if($title_string){ return $this->addPage($this->my_mb_ucfirst(trim($title_string))); } @@ -341,7 +341,7 @@ class Seo extends Widget $result = ''; $widgetData = static::findSeoByUrl($this->url); - + if ($widgetData instanceof \common\models\Seo) { $result = $widgetData->$param; -- libgit2 0.21.4