diff --git a/frontend/widgets/Seo.php b/frontend/widgets/Seo.php index 0c1d64f..0848c41 100755 --- a/frontend/widgets/Seo.php +++ b/frontend/widgets/Seo.php @@ -81,7 +81,43 @@ class Seo extends Widget // return $filter_row; // } - if (!empty($title)) { + if(!empty($filter)) { + + $array = [ + 'category' => $this->category_name + ]; + + + if (isset($filter['brands']) && count($filter['brands']) == 1) { + $model = Brand::find()->where(['alias' => $filter['brands'][0]])->one(); + + $array['brand'] = $model->name; + } + + if (isset($filter['options']["pol"]) && count($filter['options']["pol"]) == 1) { + + $model = TaxOption::find()->where(['alias' => $filter['options']["pol"]])->one(); + $array['sex'] = $model->value->value; + + + } + + if (isset($filter['options']["naznacenie"]) && count($filter['options']["naznacenie"]) == 1) { + + $model = TaxOption::find()->where(['alias' => $filter['options']["naznacenie"]])->one(); + $array['naz'] = $model->value->value; + + } + + if (isset($filter['options']["god"]) && count($filter['options']["god"]) == 1) { + + $model = TaxOption::find()->where(['alias' => $filter['options']["god"]])->one(); + $array['year'] = $model->value->value; + + } + return $this->getTitleString($array); + + } else if (!empty($title)) { return $title; } else { return $this->project_name; -- libgit2 0.21.4