Настройки компонента "Новости":
[CODE]URL страницы информационного блока:#SITE_DIR#/afisha/index.php?ID=#IBLOCK_ID#
URL страницы раздела:#SITE_DIR#/afisha/index.php?SECTION_ID=#SECTION_ID#
URL страницы детального просмотра: #SITE_DIR#/afisha/index.php?SECTION_ID=#SECTION_ID#&ELEMENT_ID=#ELEMENT_ID# [/CODE]
В шаблоне детального просмотра элемента я ничего не меняла за исключением попытки
вывести вначале название раздела, в котором находится текущий элемент,
а в конце - названия всех разделов, в которых есть этот элемент.
[CODE]<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div class="bt">
<?
$res = CIBlockSection::GetByID($_GET["SECTION_ID"]);
if($ar_res = $res->GetNext())
echo $ar_res['NAME'];
?>
</div>
<br/>
<div class="news-detail">
<?if($arParams["DISPLAY_PICTURE"]!="N" && is_array($arResult["DETAIL_PICTURE"])):?>
<img class="detail_picture" border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arResult["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arResult["DETAIL_PICTURE"]["HEIGHT"]?>" align="left" alt="<?=$arResult["NAME"]?>" title="<?=$arResult["NAME"]?>" />
<?endif?>
<?if($arParams["DISPLAY_DATE"]!="N" && $arResult["DISPLAY_ACTIVE_FROM"]):?>
<span class="news-date-time"><?=$arResult["DISPLAY_ACTIVE_FROM"]?></span>
<?endif;?>
<?if($arParams["DISPLAY_NAME"]!="N" && $arResult["NAME"]):?>
<div class="eldet"><?=$arResult["NAME"]?></div><br/>
<?endif;?>
<?if($arParams["DISPLAY_PREVIEW_TEXT"]!="N" && $arResult["FIELDS"]["PREVIEW_TEXT"]):?>
<?=$arResult["FIELDS"]["PREVIEW_TEXT"];unset($arResult["FIELDS"]["PREVIEW_TEXT"]);?>
<?endif;?>
<?if($arResult["NAV_RESULT"]):?>
<?if($arParams["DISPLAY_TOP_PAGER"]):?><?=$arResult["NAV_STRING"]?><br /><?endif;?>
<?echo $arResult["NAV_TEXT"];?>
<?if($arParams["DISPLAY_BOTTOM_PAGER"]):?><br /><?=$arResult["NAV_STRING"]?><?endif;?>
<?elseif(strlen($arResult["DETAIL_TEXT"])>0):?>
<div class="eldiscr"><?echo $arResult["DETAIL_TEXT"];?></div>
<?else:?>
<div class="eldiscr"><?echo $arResult["PREVIEW_TEXT"];?></div>
<?endif?>
<div style="clear:both"></div>
<br />
<?foreach($arResult["FIELDS"] as $code=>$value):?>
<?=GetMessage("IBLOCK_FIELD_".$code)?>: <?=$value;?>
<br />
<?endforeach;?>
<?foreach($arResult["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<font color="#5AB3F6"><?=$arProperty["NAME"]?>:</font>
<?if(is_array($arProperty["DISPLAY_VALUE"])):?>
<?=implode(" / ", $arProperty["DISPLAY_VALUE"]);?>
<?else:?>
<?=$arProperty["DISPLAY_VALUE"];?>
<?endif?>
<br />
<?endforeach;?>
<?
$rsSections = CIBlockElement::GetElementGroups($_GET["ELEMENT_ID"], true);
while ($arSection = $rsSections->GetNext())
{
$sectPath = CComponentEngine::MakePathFromTemplate(
$arResult["URL_TEMPLATES"]["section"],
array("SECTION_ID" => $arResult['VARIABLES']['SECTION_ID'])
);
?><a href="<?=$arResult["FOLDER"].$sectPath?>"><?=$arSection["NAME"]; ?></a><br /><?
}
?>
</div>
[/CODE]
По ссылке по умолчанию "Вернуться к списку" в детальном просмотре элемента мы возвращаемся на список всех элементов, а не список элементов текущего раздела, как мне бы хотелось.