Answer the question
In order to leave comments, you need to log in
Gallery on Bitrix, how to hide buttons?
There is such a gallery on Bitrix. It is
necessary to make sure that there are no back and forth buttons, but they appear only when the 5th image is added, how to do this in Bitrix? Here is the code:
<div class="gallery-box">
<div class="view">
<div class="big-image">
<?if($arResult['DETAIL_PICTURE_620']):?>
<a href="<?=$arResult['DETAIL_PICTURE']["SRC"]?>" class="fancybox-img">
<img src="<?=$arResult['DETAIL_PICTURE_620']["src"]?>" title="<?=$arResult['DETAIL_PICTURE']['TITLE']?>" width="620" />
</a>
<?elseif($arResult['DETAIL_PICTURE']):?>
<a href="<?=$arResult['DETAIL_PICTURE']["SRC"]?>" class="fancybox-img">
<img src="<?=$arResult['DETAIL_PICTURE']["SRC"]?>" title="<?=$arResult['DETAIL_PICTURE']['TITLE']?>" width="620"/>
</a>
<?endif;?>
</div>
<a href="#" class="prev"></a>
<a href="#" class="next"></a>
</div>
<div class="thumbnails">
<?if($arResult['DETAIL_PICTURE_620']):?>
<a href="<?=$arResult['DETAIL_PICTURE']["SRC"]?>" class="active" class="fancybox-img">
<img src="<?=$arResult['DETAIL_PICTURE_620']["src"]?>" title="<?=$arResult['DETAIL_PICTURE']['TITLE']?>" width="620" />
</a>
<?endif;?>
<?foreach ($arResult["PROPERTIES"]["more_picture"]["VALUE"] as $files):?>
<? $arFile = CFile::GetFileArray($files);
if( $arFile) :?>
<a href="<?=$arFile["SRC"]?>" data-title="<?=$arFile["ORIGINAL_NAME"]?>">
<img src="<?=$arFile["SRC"]?>" alt="img">
</a>
<? endif; ?>
<?endforeach?>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
you need to calculate how much you have in $arResult["PROPERTIES"]["more_picture"]["VALUE"] and throw
if ($count >= 5)
<a href="#" class="prev"></a>
<a href="#" class="next"></a>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question