Код |
---|
$ibFields = CIBlock::GetFields($arResult['IBLOCK_ID']); echo "Ширина картинки анонса, установленная в настройках инфоблока: '. $ibFields['PREVIEW_PICTURE']['DEFAULT_VALUE']['WIDTH']<br>"; echo "Высота картинки анонса, установленная в настройках инфоблока: '. $ibFields['PREVIEW_PICTURE']['DEFAULT_VALUE']['HEIGHT']<br>"; echo "Ширина детальной картинки, установленная в настройках инфоблока: '. $ibFields['PREVIEW_PICTURE']['DEFAULT_VALUE']['WIDTH']<br>"; echo "Высота детальной картинки, установленная в настройках инфоблока: '. $ibFields['PREVIEW_PICTURE']['DEFAULT_VALUE']['HEIGHT']<br>"; |
Код |
---|
... <? $ibFields = CIBlock::GetFields($arResult['IBLOCK_ID']); // получаем массив значений полей инфоблока текущего инфоблока ?> ... <?if(is_array($arResult["PREVIEW_PICTURE"]) || is_array($arResult["DETAIL_PICTURE"])):?> <td> <?if(is_array($arResult["PREVIEW_PICTURE"]) && is_array($arResult["DETAIL_PICTURE"])):?> <img border="0" src="<?=$arResult["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$ibFields['PREVIEW_PICTURE']['DEFAULT_VALUE']['WIDTH']?>" height="<?=$ibFields['PREVIEW_PICTURE']['DEFAULT_VALUE']["HEIGHT"]?>" alt="<?=$arResult["NAME"]?>" title="<?=$arResult["NAME"]?>" id="image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>" style="display:block;cursor:pointer;cursor: hand;" OnC lick="document.getElementById('image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>').style.display='none';document.getElementById('image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>').style.display='block'" /> <img border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$ibFields['DETAIL_PICTURE']['DEFAULT_VALUE']["WIDTH"]?>" height="<?=$ibFields['DETAIL_PICTURE']['DEFAULT_VALUE']["HEIGHT"]?>" alt="<?=$arResult["NAME"]?>" title="<?=$arResult["NAME"]?>" id="image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>" style="display:none;cursor:pointer; cursor: hand;" OnC lick="document.getElementById('image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>').style.display='none';document.getElementById('image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>').style.display='block'" /> <?elseif(is_array($arResult["DETAIL_PICTURE"])):?> <img border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$ibFields['DETAIL_PICTURE']['DEFAULT_VALUE']["WIDTH"]?>" height="<?=$ibFields['DETAIL_PICTURE']['DEFAULT_VALUE']["HEIGHT"]?>" alt="<?=$arResult["NAME"]?>" title="<?=$arResult["NAME"]?>" /> <?elseif(is_array($arResult["PREVIEW_PICTURE"])):?> <img border="0" src="<?=$arResult["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$ibFields['PREVIEW_PICTURE']['DEFAULT_VALUE']['WIDTH']?>" height="<?=$ibFields['PREVIEW_PICTURE']['DEFAULT_VALUE']["HEIGHT"]?>" alt="<?=$arResult["NAME"]?>" title="<?=$arResult["NAME"]?>" /> <?endif?> <?if(count($arResult["MORE_PHOTO"])>0):?> <br /><a href="#more_photo"><?=GetMessage("CATALOG_MORE_PHOTO")?></a> <?endif;?> </td> ... |