diff --git a/frontend/widgets/Seo.php b/frontend/widgets/Seo.php index 626dc8a..47699f6 100755 --- a/frontend/widgets/Seo.php +++ b/frontend/widgets/Seo.php @@ -51,7 +51,41 @@ class Seo extends Widget switch ($this->row) { case self::SEO_TEXT: - return $this->selectSeoData(self::SEO_TEXT); + + + $filter = \Yii::$app->request->get('filter', []); + $sort = \Yii::$app->request->get('sort', []); + $paginate = \Yii::$app->request->get('page', []); + + if(empty($filter) && empty($sort) && empty($paginate) ){ + + return $this->selectSeoData(self::SEO_TEXT); + + } else { + + $widgetData = $this->findSeoByUrl(); + + $result = ''; + + if ($widgetData instanceof \common\models\Seo) { + + $result = $widgetData->{self::SEO_TEXT}; + + } else { + + $widgetData = $this->findSeoByDynamic(); + + if ($widgetData instanceof SeoDynamic) { + + $result = $widgetData->{self::SEO_TEXT}; + + } + + } + + return $this->replaceData($result); + } + break; case self::H1: -- libgit2 0.21.4