Commit c8e3b27c0adb444e191c97a031d6b2a6dfd364fd
1 parent
5ef6db64
Все не русские страницы должны бытиь закрыты на noindex,nofollow
Showing
2 changed files
with
18 additions
and
1 deletions
Show diff stats
| 1 | +<?php | |
| 2 | +namespace common\components; | |
| 3 | + | |
| 4 | +use artbox\core\components\SeoComponent as CoreSeoComponent; | |
| 5 | +use artbox\core\models\Language; | |
| 6 | + | |
| 7 | + | |
| 8 | +class SeoComponent extends CoreSeoComponent | |
| 9 | +{ | |
| 10 | + public function getRobots() | |
| 11 | + { | |
| 12 | + $language=Language::getCurrent(); | |
| 13 | + $languageId=$language->attributes['id']; | |
| 14 | + if($languageId!=2)return 'noindex,nofollow'; | |
| 15 | + else return parent::getRobots(); | |
| 16 | + } | |
| 17 | +} | |
| 0 | 18 | \ No newline at end of file | ... | ... |