diff --git a/widgets/Seo.php b/widgets/Seo.php index 4ec7f6f..a2bb142 100755 --- a/widgets/Seo.php +++ b/widgets/Seo.php @@ -149,26 +149,25 @@ class Seo extends Widget $filter = \Yii::$app->request->get('filters', []); $description = $this->selectSeoData(self::DESCRIPTION, $filter,$priority); - 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)) -// ]); -// } -// -// } + + 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