Commit 31c230f69e39be5b67eb9604e81e2685eb63d5fc
1 parent
585f04ca
15.04.16 seo widget
Showing
1 changed file
with
8 additions
and
11 deletions
Show diff stats
frontend/widgets/Seo.php
... | ... | @@ -130,29 +130,26 @@ class Seo extends Widget |
130 | 130 | protected function selectSeoData($param){ |
131 | 131 | $result = ''; |
132 | 132 | |
133 | + $widgetData = $this->findSeoByUrl(); | |
133 | 134 | |
135 | + if($widgetData instanceof \common\models\Seo){ | |
134 | 136 | |
135 | - if(!empty($this->$param)){ | |
137 | + $result = $widgetData->$param; | |
138 | + | |
139 | + }else if(!empty($this->$param)){ | |
136 | 140 | |
137 | 141 | $result = $this->$param; |
138 | 142 | |
139 | 143 | } else { |
140 | 144 | |
141 | - $widgetData = $this->findSeoByUrl(); | |
145 | + $widgetData = $this->findSeoByDynamic(); | |
142 | 146 | |
143 | - if($widgetData instanceof \common\models\Seo){ | |
147 | + if($widgetData instanceof SeoDynamic){ | |
144 | 148 | |
145 | 149 | $result = $widgetData->$param; |
146 | - } else { | |
147 | - | |
148 | - $widgetData = $this->findSeoByDynamic(); | |
149 | - | |
150 | - if($widgetData instanceof SeoDynamic){ | |
151 | 150 | |
152 | - $result = $widgetData->$param; | |
153 | - | |
154 | - } | |
155 | 151 | } |
152 | + | |
156 | 153 | } |
157 | 154 | |
158 | 155 | return $this->replaceData($result); | ... | ... |