gldtn
Well-known member
How do I do a foreach loop up to only 5 items in a template?
This is what I have so far but I need to stop the loop after X amount of items
Thanks
This is what I have so far but I need to stop the loop after X amount of items
Code:
<div class="ctaSliderThumbs">
<ul>
<xen:foreach loop="$sliderEntries" value="$sliderEntry">
<li class="avatar">
<a href="{xen:link threads, {xen:string censor, $sliderEntry}}">
<img src="{xen:helper featuredthreadsliderurl, $sliderEntry}"
alt="{xen:string censor, $sliderEntry.featured_title}"
width="50"
height="50" />
</a>
</li>
</xen:foreach>
</ul>
</div>
Thanks