diff --git a/frontend/widgets/Seo.php b/frontend/widgets/Seo.php index 36a57f2..d93765b 100644 --- a/frontend/widgets/Seo.php +++ b/frontend/widgets/Seo.php @@ -130,29 +130,26 @@ class Seo extends Widget protected function selectSeoData($param){ $result = ''; + $widgetData = $this->findSeoByUrl(); + if($widgetData instanceof \common\models\Seo){ - if(!empty($this->$param)){ + $result = $widgetData->$param; + + }else if(!empty($this->$param)){ $result = $this->$param; } else { - $widgetData = $this->findSeoByUrl(); + $widgetData = $this->findSeoByDynamic(); - if($widgetData instanceof \common\models\Seo){ + if($widgetData instanceof SeoDynamic){ $result = $widgetData->$param; - } else { - - $widgetData = $this->findSeoByDynamic(); - - if($widgetData instanceof SeoDynamic){ - $result = $widgetData->$param; - - } } + } return $this->replaceData($result); -- libgit2 0.21.4