Вывод поля “набор изображений” в UMI для PHP шаблонизатора

15.06.2019
$pics = $page->getValue('izobrazheniya');

<?php if (!empty($pics)):?>
   <div class="flexslider5 carousel">
      <ul class="slides">
         <?php foreach($pics as $key=>$pic):
            /* @var umiImageFile $pic*/
            $img = $this->macros('content', 'makeThumb', array($key, 'auto', 238, 'canvas'));
            $alt = $pic->getAlt();
            $big = $pic->getFilePath(1);
         ?>
         <li>
            <a href="<?=$big?>" class="fb" rel="collection">
               <img src = "<?=$img['src']?>" alt="<?=$alt?>" title="<?=$alt?>"/>
            </a>
         </li>
         <?php endforeach;?>
      </ul>
   </div>
<?php endif; ?>

Comments 0

Добавить комментарий

Your email address will not be published. Required fields are marked *