diff --git a/backend/views/seo/_form.php b/backend/views/seo/_form.php index 7e03a52..9853be6 100755 --- a/backend/views/seo/_form.php +++ b/backend/views/seo/_form.php @@ -17,6 +17,8 @@ use mihaildev\elfinder\ElFinder; = $form->field($model, 'title')->textInput(['maxlength' => true]) ?> + = $form->field($model, 'meta')->textInput(['maxlength' => true]) ?> + = $form->field($model, 'description')->textInput(['maxlength' => true]) ?> = $form->field($model, 'h1')->textInput(['maxlength' => true]) ?> diff --git a/backend/views/seo/_search.php b/backend/views/seo/_search.php index d3b1fa4..fe3f629 100755 --- a/backend/views/seo/_search.php +++ b/backend/views/seo/_search.php @@ -19,7 +19,9 @@ use yii\widgets\ActiveForm; = $form->field($model, 'url') ?> - = $form->field($model, 'title') ?> + = $form->field($model, 'meta') ?> + + = $form->field($model, 'title') ?> = $form->field($model, 'description') ?> diff --git a/backend/views/seo/index.php b/backend/views/seo/index.php index 2937565..846ea6d 100755 --- a/backend/views/seo/index.php +++ b/backend/views/seo/index.php @@ -26,6 +26,7 @@ $this->params['breadcrumbs'][] = $this->title; 'seo_id', 'url:url', + 'meta', 'title', 'description', 'h1', diff --git a/backend/views/seo/view.php b/backend/views/seo/view.php index b98bcb4..fa1330f 100755 --- a/backend/views/seo/view.php +++ b/backend/views/seo/view.php @@ -31,6 +31,7 @@ $this->params['breadcrumbs'][] = $this->title; 'seo_id', 'url:url', 'title', + 'meta', 'description', 'h1', 'seo_text:ntext', diff --git a/common/models/Seo.php b/common/models/Seo.php index 8fccb9a..86df70e 100755 --- a/common/models/Seo.php +++ b/common/models/Seo.php @@ -10,6 +10,7 @@ use Yii; * @property integer $seo_id * @property string $url * @property string $title + * @property string $meta * @property string $description * @property string $h1 * @property string $seo_text @@ -32,7 +33,7 @@ class Seo extends \yii\db\ActiveRecord return [ [['url'], 'required'], [['seo_text'], 'string'], - [['url', 'title', 'description', 'h1'], 'string', 'max' => 255], + [['url', 'title', 'meta', 'description', 'h1'], 'string', 'max' => 255], ]; } @@ -45,6 +46,7 @@ class Seo extends \yii\db\ActiveRecord 'seo_id' => Yii::t('app', 'seo_id'), 'url' => Yii::t('app', 'url'), 'title' => Yii::t('app', 'title'), + 'meta' => Yii::t('app', 'meta_title'), 'description' => Yii::t('app', 'description'), 'h1' => Yii::t('app', 'h1'), 'seo_text' => Yii::t('app', 'seo_text'), diff --git a/common/models/SeoSearch.php b/common/models/SeoSearch.php index 14af48f..e8882bc 100755 --- a/common/models/SeoSearch.php +++ b/common/models/SeoSearch.php @@ -19,7 +19,7 @@ class SeoSearch extends Seo { return [ [['seo_id'], 'integer'], - [['url', 'title', 'description', 'h1', 'seo_text'], 'safe'], + [['url', 'title', 'meta', 'description', 'h1', 'seo_text'], 'safe'], ]; } @@ -64,6 +64,7 @@ class SeoSearch extends Seo $query->andFilterWhere(['like', 'url', $this->url]) ->andFilterWhere(['like', 'title', $this->title]) + ->andFilterWhere(['like', 'meta', $this->meta]) ->andFilterWhere(['like', 'description', $this->description]) ->andFilterWhere(['like', 'h1', $this->h1]) ->andFilterWhere(['like', 'seo_text', $this->seo_text]); diff --git a/frontend/views/catalog/product.php b/frontend/views/catalog/product.php index 0883aa3..a9cb310 100755 --- a/frontend/views/catalog/product.php +++ b/frontend/views/catalog/product.php @@ -2,7 +2,7 @@ use yii\widgets\Breadcrumbs; use yii\web\View; use yii\helpers\Url; -$this->params['seo']['title'] = $product->fullname ; +$this->params['seo']['title'] = $product->fullname; $this->title = $product->fullname; //$this->title = (! empty($product->meta_title)) ? $product->meta_title : $product->fullname; //$this->registerMetaTag (['name' => 'description', 'content' => ((! empty($product->meta_description)) ? $product->meta_description : $product->fullname)]); diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 9790b46..9b858c0 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -85,6 +85,7 @@ ga('send', 'pageview'); = Html::csrfMetaTags () ?>