diff --git a/models/SeoDynamicLang.php b/models/SeoDynamicLang.php index dbe61de..3f5e974 100755 --- a/models/SeoDynamicLang.php +++ b/models/SeoDynamicLang.php @@ -16,7 +16,7 @@ * @property string $h1 * @property string $key * @property string $meta - * @property string $meta_description + * @property string $description * @property string $seo_text * @property Language $language * @property SeoDynamic $seoDynamic @@ -48,7 +48,7 @@ return [ [ [ - 'meta_description', + 'description', 'seo_text', ], 'string', @@ -104,7 +104,7 @@ 'h1' => 'h1', 'key' => 'key', 'meta' => 'meta', - 'meta_description' => 'meta description', + 'description' => 'description', 'seo_text' => 'seo text', ]; } diff --git a/views/seo-dynamic/_form_language.php b/views/seo-dynamic/_form_language.php index 192fff6..182add0 100755 --- a/views/seo-dynamic/_form_language.php +++ b/views/seo-dynamic/_form_language.php @@ -17,7 +17,7 @@ field($model_lang, '[' . $language->id . ']title') ->textInput([ 'maxlength' => true ]); ?> -field($model_lang, '[' . $language->id . ']meta_description')->textarea() ?> +field($model_lang, '[' . $language->id . ']description')->textarea() ?> field($model_lang, '[' . $language->id . ']key') ->textInput([ 'maxlength' => true ]) ?> diff --git a/widgets/Seo.php b/widgets/Seo.php index 7bc9709..4ec7f6f 100755 --- a/widgets/Seo.php +++ b/widgets/Seo.php @@ -29,7 +29,7 @@ class Seo extends Widget const SEO_TEXT = 'seo_text'; - const DESCRIPTION = 'meta_description'; + const DESCRIPTION = 'description'; const META = 'meta'; const H1 = 'h1'; const TITLE = 'title'; @@ -149,25 +149,26 @@ class Seo extends Widget $filter = \Yii::$app->request->get('filters', []); $description = $this->selectSeoData(self::DESCRIPTION, $filter,$priority); - - if (!empty($description)) { - - $this->getView()->registerMetaTag([ - 'name' => 'description', - 'content' => $this->prepareString($description) - ]); - - } else { - - if(!empty($filter)){ - $array = $this->arrayBuilder($filter); - $this->getView()->registerMetaTag([ - 'name' => 'description', - 'content' => $this->prepareString($this->getDescriptionString($array,$description)) - ]); - } - - } + print 'fdasfasd'; + die(); +// if (!empty($description)) { +// +// $this->getView()->registerMetaTag([ +// 'name' => 'description', +// 'content' => $this->prepareString($description) +// ]); +// +// } else { +// +// if(!empty($filter)){ +// $array = $this->arrayBuilder($filter); +// $this->getView()->registerMetaTag([ +// 'name' => 'description', +// 'content' => $this->prepareString($this->getDescriptionString($array,$description)) +// ]); +// } +// +// } break; case self::META: -- libgit2 0.21.4