Из оригинального ShowHead bitrix:
<?php
// CMain::ShowHead()
// /bitrix/modules/main/classes/general/main.php:837
public function ShowHead($bXhtmlStyle=true)
{
echo '<meta http-equiv="Content-Type" content="text/html; charset='.LANG_CHARSET.'"'.($bXhtmlStyle? ' /':'').'>'."\n";
$this->ShowMeta("robots", false, $bXhtmlStyle);
$this->ShowMeta("keywords", false, $bXhtmlStyle);
$this->ShowMeta("description", false, $bXhtmlStyle);
$this->ShowLink("canonical", null, $bXhtmlStyle);
$this->ShowCSS(true, $bXhtmlStyle);
$this->ShowHeadStrings();
$this->ShowHeadScripts();
}
?>Фильтруем показ, для разных пользователей
<head>
<?
function ShowHeadCustom($bXhtmlStyle=true) {
global $APPLICATION;
echo '<meta http-equiv="Content-Type" content="text/html; charset='.LANG_CHARSET.'"'.($bXhtmlStyle? ' /':'').'>'."\n";
$APPLICATION->ShowMeta("robots", false, $bXhtmlStyle);
$APPLICATION->ShowMeta("keywords", false, $bXhtmlStyle);
$APPLICATION->ShowMeta("description", false, $bXhtmlStyle);
$APPLICATION->ShowLink("canonical", null, $bXhtmlStyle);
}
global $USER;
if($USER->IsAdmin()){
$APPLICATION->ShowHead();
} else {
ShowHeadCustom();
}
?>
<title><? $APPLICATION->ShowTitle(false) ?></title>
</head>
<body>
...
Ваша разметка
...
<?
function ShowBottomKernel($bXhtmlStyle=true) {
global $APPLICATION;
$APPLICATION->ShowCSS(true, $bXhtmlStyle);
$APPLICATION->ShowHeadStrings();
$APPLICATION->ShowHeadScripts();
}
if(!$USER->IsAdmin()) {
ShowBottomKernel();
}
?>Источник: quantum-lab.ru



