1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
metarobots.php
См. документацию.
1<?php
2namespace Bitrix\Landing\Hook\Page;
3
4use \Bitrix\Landing\Field;
5use \Bitrix\Main\Localization\Loc;
6
7Loc::loadMessages(__FILE__);
8
10{
15 protected function getMap()
16 {
17 return array(
18 'INDEX' => new Field\Checkbox('INDEX', array(
19 'title' => Loc::getMessage('LANDING_HOOK_MRINDEX')
20 ))
21 );
22 }
23
28 public function getTitle()
29 {
30 return Loc::getMessage('LANDING_HOOK_MR_NAME');
31 }
32
37 public function enabled()
38 {
39 return true;//always
40 }
41
46 public function enabledInEditMode()
47 {
48 return false;
49 }
50
55 public function exec()
56 {
57 if ($this->execCustom())
58 {
59 return;
60 }
61
62 if (\Bitrix\Landing\Landing::getPreviewMode())
63 {
64 $use = 'N';
65 }
66 else
67 {
68 $use = $this->fields['INDEX']->getValue();
69 }
70 \Bitrix\Main\Page\Asset::getInstance()->addString(
71 '<meta name="robots" content="' . ($use != 'N' ? 'all' : 'noindex') . '" />'
72 );
73 }
74}
execCustom()
Определения page.php:262
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения checkbox.php:2
Определения agent.php:3