Добрый день! Никак не могу решить следующую задачу:
Как в разделе инфоблока вывести фотографии товаров? Сейчас фотографии выводятся как "элемент инфоблока" - анонс фотографии с переходом на страницу товара. Необходимо, чтобы в разделе была просто галерея изображений и обязательно каждое фото увеличивалось при клике.
Мне кажется вопрос очень простой, но мне не хватает знаний
Подскажите, кто знает. Спасибо.
Раздел инфоблока выводится так:
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
$APPLICATION->SetPageProperty("seo_title", $arResult['NAME'] . " ");
?>
<div class="category-text">
<?
$path = $APPLICATION->GetCurPageParam();
if ( preg_match('/(.*)PAGEN_1=1(.*)/', $path) || !preg_match('/(.*)PAGEN_1(.*)/', $path) ):
?>
<?if($arResult["UF_TEXT"]!=""):?>
<div><?echo $arResult["UF_TEXT"]?></div>
<?endif;?>
<?endif;?>
</div>
<?if($arResult['ITEMS']):?>
<pre style="display:none;">
<?
//print_r($arResult);
?>
</pre>
<div class="section">
<?
foreach($arResult['ITEMS'] as $arItem):
$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], $strElementEdit);
$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], $strElementDelete, $arElementDeleteParams);
$strMainID = $this->GetEditAreaId($arItem['ID']);
?>
<div id="<?echo $strMainID;?>" class="item item-sale">
<?$intSale = mt_rand(10, 15);?>
<div class="photo"><a href="<?=$arItem['DETAIL_PAGE_URL']?>?sale=<?=$intSale?>"><img src="<?=$arItem['PREVIEW_PICTURE']['SRC']?>" /></a></div>
<?/*<div class="title"><a href="<?=$arItem['DETAIL_PAGE_URL']?>?sale=<?=$intSale?>"><?=$arItem['NAME']?></a></div>*/?>
<!--<div class="price">От <?=number_format($arItem['PRICES']['PRICE_FROM']['VALUE'], 0, ',', ' ')?> <span class="rbl"></span></div>-->
<?/*<div class="sale">Скидка <?=$intSale?>%</div>*/?>
</div>
<?endforeach;?>
</div>
<?endif;?>
<?
if ($arParams["DISPLAY_BOTTOM_PAGER"])
{
echo $arResult["NAV_STRING"];
}
?>
<?
$path = $APPLICATION->GetCurPageParam();
if ( preg_match('/(.*)PAGEN_1=1(.*)/', $path) || !preg_match('/(.*)PAGEN_1(.*)/', $path) ):
?>
<?if($arResult["DESCRIPTION"]!=""):?>
<div><?echo $arResult["DESCRIPTION"]?></div>
<?endif;?>
<?endif;?>
Как в разделе инфоблока вывести фотографии товаров? Сейчас фотографии выводятся как "элемент инфоблока" - анонс фотографии с переходом на страницу товара. Необходимо, чтобы в разделе была просто галерея изображений и обязательно каждое фото увеличивалось при клике.
Мне кажется вопрос очень простой, но мне не хватает знаний
Подскажите, кто знает. Спасибо.
Раздел инфоблока выводится так:
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
$APPLICATION->SetPageProperty("seo_title", $arResult['NAME'] . " ");
?>
<div class="category-text">
<?
$path = $APPLICATION->GetCurPageParam();
if ( preg_match('/(.*)PAGEN_1=1(.*)/', $path) || !preg_match('/(.*)PAGEN_1(.*)/', $path) ):
?>
<?if($arResult["UF_TEXT"]!=""):?>
<div><?echo $arResult["UF_TEXT"]?></div>
<?endif;?>
<?endif;?>
</div>
<?if($arResult['ITEMS']):?>
<pre style="display:none;">
<?
//print_r($arResult);
?>
</pre>
<div class="section">
<?
foreach($arResult['ITEMS'] as $arItem):
$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], $strElementEdit);
$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], $strElementDelete, $arElementDeleteParams);
$strMainID = $this->GetEditAreaId($arItem['ID']);
?>
<div id="<?echo $strMainID;?>" class="item item-sale">
<?$intSale = mt_rand(10, 15);?>
<div class="photo"><a href="<?=$arItem['DETAIL_PAGE_URL']?>?sale=<?=$intSale?>"><img src="<?=$arItem['PREVIEW_PICTURE']['SRC']?>" /></a></div>
<?/*<div class="title"><a href="<?=$arItem['DETAIL_PAGE_URL']?>?sale=<?=$intSale?>"><?=$arItem['NAME']?></a></div>*/?>
<!--<div class="price">От <?=number_format($arItem['PRICES']['PRICE_FROM']['VALUE'], 0, ',', ' ')?> <span class="rbl"></span></div>-->
<?/*<div class="sale">Скидка <?=$intSale?>%</div>*/?>
</div>
<?endforeach;?>
</div>
<?endif;?>
<?
if ($arParams["DISPLAY_BOTTOM_PAGER"])
{
echo $arResult["NAV_STRING"];
}
?>
<?
$path = $APPLICATION->GetCurPageParam();
if ( preg_match('/(.*)PAGEN_1=1(.*)/', $path) || !preg_match('/(.*)PAGEN_1(.*)/', $path) ):
?>
<?if($arResult["DESCRIPTION"]!=""):?>
<div><?echo $arResult["DESCRIPTION"]?></div>
<?endif;?>
<?endif;?>