From d482cb6f5254bf4e9e5ac4109513aea72934d7c5 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 8 Jul 2016 14:49:12 +0300 Subject: [PATCH] 29.06.16 --- frontend/widgets/Seo.php | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/frontend/widgets/Seo.php b/frontend/widgets/Seo.php index 272daa1..3e3e930 100755 --- a/frontend/widgets/Seo.php +++ b/frontend/widgets/Seo.php @@ -100,15 +100,23 @@ class Seo extends Widget - } if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1) { + } + if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1) { + + $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); + if($this->selectSeoData(self::H1) == $this->category_name) { - $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); - return $this->selectSeoData(self::H1).' '.$model->value->value; + return $this->selectSeoData(self::H1) . ' ' . $model->name; + }else { - } else { - return $this->selectSeoData(self::H1); - } + return $this->selectSeoData(self::H1); + } + + + } else { + return $this->selectSeoData(self::H1); + } break; case self::TITLE: @@ -153,12 +161,12 @@ class Seo extends Widget } - return ucfirst($this->getTitleString($array)); + return $this->getTitleString($array); } else if (!empty($title)) { - return ucfirst($title); + return $title; } else { - return ucfirst($this->project_name); + return $this->project_name; } break; -- libgit2 0.21.4