Commit 4727bc7138e93ea8ccf2ebfb99459145f25b24da
1 parent
30258898
исправляю баг
Showing
1 changed file
with
5 additions
and
3 deletions
Show diff stats
frontend/views/layouts/main.php
... | ... | @@ -185,14 +185,16 @@ $seoTitleName = $seo->title; |
185 | 185 | <meta name="viewport" content="width=device-width"> |
186 | 186 | <link type="image/x-icon" href="favicon.ico" rel="icon"> |
187 | 187 | <?= Html::csrfMetaTags() ?> |
188 | + | |
189 | + | |
188 | 190 | <?php |
189 | - $serviceModel = new Service(['id' => $_GET['service_id']]); | |
190 | - $serviceName = $serviceModel->language->title; | |
191 | + | |
191 | 192 | if ($seo->title == '' |
192 | 193 | && \Yii::$app->controller->id == 'site' |
193 | 194 | && \Yii::$app->controller->action->id == 'comments' |
194 | 195 | ) { |
195 | - | |
196 | + $serviceModel = new Service(['id' => $_GET['service_id']]); | |
197 | + $serviceName = $serviceModel->language->title; | |
196 | 198 | $seoTitleName = $this->params['breadcrumbs'][0] . ' - ' . $serviceName . ' - ' . \Yii::t('app', 'ABC short'); |
197 | 199 | |
198 | 200 | } | ... | ... |