| @@ 141-160 (lines=20) @@ | ||
| 138 | if (null !== $selected_category = $selected_category_id) { |
|
| 139 | if ($selected_category_id > 0) { |
|
| 140 | if (null !== $selected_category = Category::findById($selected_category_id, null)) { |
|
| 141 | if (!empty($selected_category->meta_description)) { |
|
| 142 | $this->view->registerMetaTag( |
|
| 143 | [ |
|
| 144 | 'name' => 'description', |
|
| 145 | 'content' => ContentBlockHelper::compileContentString( |
|
| 146 | $selected_category->meta_description, |
|
| 147 | get_class($product) . ":{$selected_category->id}:meta_description", |
|
| 148 | new TagDependency( |
|
| 149 | [ |
|
| 150 | 'tags' => [ |
|
| 151 | ActiveRecordHelper::getCommonTag(ContentBlock::className()), |
|
| 152 | ActiveRecordHelper::getCommonTag(Category::className()) |
|
| 153 | ] |
|
| 154 | ] |
|
| 155 | ) |
|
| 156 | ) |
|
| 157 | ], |
|
| 158 | 'meta_description' |
|
| 159 | ); |
|
| 160 | } |
|
| 161 | ||
| 162 | $this->view->title = $selected_category->title; |
|
| 163 | } |
|
| @@ 302-321 (lines=20) @@ | ||
| 299 | ]); |
|
| 300 | EventTriggeringHelper::triggerSpecialEvent($specialEvent); |
|
| 301 | ||
| 302 | if (!empty($productModel->meta_description)) { |
|
| 303 | $this->view->registerMetaTag( |
|
| 304 | [ |
|
| 305 | 'name' => 'description', |
|
| 306 | 'content' => ContentBlockHelper::compileContentString( |
|
| 307 | $productModel->meta_description, |
|
| 308 | get_class($product) . ":{$productModel->id}:meta_description", |
|
| 309 | new TagDependency( |
|
| 310 | [ |
|
| 311 | 'tags' => [ |
|
| 312 | ActiveRecordHelper::getCommonTag(ContentBlock::className()), |
|
| 313 | ActiveRecordHelper::getCommonTag(get_class($product)) |
|
| 314 | ] |
|
| 315 | ] |
|
| 316 | ) |
|
| 317 | ) |
|
| 318 | ], |
|
| 319 | 'meta_description' |
|
| 320 | ); |
|
| 321 | } |
|
| 322 | ||
| 323 | $selected_category = ($selected_category_id > 0) ? Category::findById($selected_category_id) : null; |
|
| 324 | ||