Commit d482cb6f5254bf4e9e5ac4109513aea72934d7c5
1 parent
87451675
29.06.16
Showing
1 changed file
with
17 additions
and
9 deletions
Show diff stats
frontend/widgets/Seo.php
... | ... | @@ -100,15 +100,23 @@ class Seo extends Widget |
100 | 100 | |
101 | 101 | |
102 | 102 | |
103 | - } if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1) { | |
103 | + } | |
104 | + if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1) { | |
105 | + | |
106 | + $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); | |
107 | + if($this->selectSeoData(self::H1) == $this->category_name) { | |
104 | 108 | |
105 | - $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); | |
106 | - return $this->selectSeoData(self::H1).' '.$model->value->value; | |
109 | + return $this->selectSeoData(self::H1) . ' ' . $model->name; | |
107 | 110 | |
111 | + }else { | |
108 | 112 | |
109 | - } else { | |
110 | - return $this->selectSeoData(self::H1); | |
111 | - } | |
113 | + return $this->selectSeoData(self::H1); | |
114 | + } | |
115 | + | |
116 | + | |
117 | + } else { | |
118 | + return $this->selectSeoData(self::H1); | |
119 | + } | |
112 | 120 | break; |
113 | 121 | case self::TITLE: |
114 | 122 | |
... | ... | @@ -153,12 +161,12 @@ class Seo extends Widget |
153 | 161 | |
154 | 162 | } |
155 | 163 | |
156 | - return ucfirst($this->getTitleString($array)); | |
164 | + return $this->getTitleString($array); | |
157 | 165 | |
158 | 166 | } else if (!empty($title)) { |
159 | - return ucfirst($title); | |
167 | + return $title; | |
160 | 168 | } else { |
161 | - return ucfirst($this->project_name); | |
169 | + return $this->project_name; | |
162 | 170 | } |
163 | 171 | |
164 | 172 | break; | ... | ... |