From 4b4be5ead70a22ac7618f39f8828e72177f7ca6f Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 8 Jul 2016 15:58:28 +0300 Subject: [PATCH] 29.06.16 --- frontend/widgets/Seo.php | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/frontend/widgets/Seo.php b/frontend/widgets/Seo.php index e8cd728..71791c7 100755 --- a/frontend/widgets/Seo.php +++ b/frontend/widgets/Seo.php @@ -94,29 +94,28 @@ class Seo extends Widget - if (isset($filter['brands']) && count($filter['brands']) == 1) { - $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one(); - return $this->selectSeoData(self::H1) ? $this->selectSeoData(self::H1) : $model->name; + if (isset($filter['brands']) && count($filter['brands']) == 1) { + $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one(); + if($this->selectSeoData(self::H1) == $this->category_name) { - } - if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1) { + return $this->selectSeoData(self::H1) . ' ' . $model->name; + }else { - $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); - if($this->selectSeoData(self::H1) == $this->category_name) { + return $this->selectSeoData(self::H1); - return $this->selectSeoData(self::H1) . ' ' . isset($model->name) ?$model->name : ''; + } - }else { + } else if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1) { - return $this->selectSeoData(self::H1); - } + $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); + return $this->selectSeoData(self::H1).' '.$model->value->value; - } else { - return $this->selectSeoData(self::H1); - } + } else { + return $this->selectSeoData(self::H1); + } break; case self::TITLE: -- libgit2 0.21.4