<?php if ($arResult['VISUAL']['ANCHORS']['POSITION'] === 'fixed')Заменить на такое:
$APPLICATION->AddViewContent('template-header-fixed-after', $view);
else
$APPLICATION->AddViewContent('template-header-desktop-after', $view);
?>
<?php if ($arResult['VISUAL']['ANCHORS']['POSITION'] === 'fixed') {
$APPLICATION->AddViewContent('template-header-fixed-after', $view);
echo $APPLICATION->ShowViewContent('template-header-fixed-after');
} else {
$APPLICATION->AddViewContent('template-header-desktop-after', $view);
echo $APPLICATION->ShowViewContent('template-header-desktop-after');
}
?>