V
V
viktorulyushev2016-11-02 13:59:44
1C-Bitrix
viktorulyushev, 2016-11-02 13:59:44

Gallery on Bitrix, how to hide buttons?

There is such a gallery on Bitrix. It is c504f037b29f4616b751c4b5d4544d80.PNG
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>

and so, I took the gallery from here www.coderpro.ru/prostaya-galereya-na-jquery.html

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2016-11-02
@viktorulyushev

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>

A
Anton, 2016-11-02
@karminski

.prev, .next {
    display: none;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question