<?php if($banners->count()): ?> <div class="banners"> <ul> <?php foreach($banners as $banner): ?> <li> <?php if(!empty($banner->bannerTranslations->first()->href)): ?> <a href="<?php echo url($banner->bannerTranslations->first()->href); ?>" target="_<?php echo $banner->bannerTranslations->first()->target; ?>"> <?php echo HTML::image($banner->bannerTranslations->first()->image->url('full')); ?> </a> <?php else: ?> <?php echo HTML::image($banner->bannerTranslations->first()->image->url('full')); ?> <?php endif; ?> </li> <?php endforeach; ?> </ul> </div> <?php $__env->startSection('scripts'); ?> @parent <?php if($banners->count()>1): ?> $(function() { $('.banners').unslider({ speed: 1250, delay: 5000, keys: false, dots: true, fluid: false }); }); <?php endif; ?> <?php $__env->stopSection(); ?> <?php endif; ?>