<?if(count($arResult["ITEMS"])>0):?>
<?foreach($arResult["ITEMS"] as $arElement):?>
<?
CModule::IncludeModule('iblock');
$rs = CIBlockElement::GetList(
array(),
array(
'ID' => $arElement["ID"],
'NAME' => $arElement["NAME"],
'DETAIL_TEXT' => $arElement["DETAIL_TEXT"]
),
false,
array('nTopCount' => 500),
array('ID', 'NAME', 'DETAIL_TEXT'));
$user_filed = $rs->Fetch();
?>
<?
$res = CIBlockElement::GetByID($user_filed["ID"]);
if($ar_res = $res->GetNext()) {
$res = CIBlockSection::GetByID($ar_res['ID']);
if($ar_res = $res->GetNext())
print "<span>".$ar_res["ID"]."</span>, ";
print "<span>".$ar_res["NAME"]."</span>, ";
print "<em>".$user_filed["DETAIL_TEXT"]."</em>";
}
?>
<?endforeach;?>
<?endif?> |