Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Limit <% control %> items


Reply


2 Posts   1178 Views

Avatar
carlo

Community Member, 5 Posts

24 April 2012 at 10:10pm

Edited: 24/04/2012 10:11pm

Hey

How can I limit control-items in my .ss template, in my case an image-gallery-images (for example, limit to 2 items)?
I tried following without result:

<% control NewsImages(2) %>
   $Attachment.croppedImage(100,100)
<% end_control %>

Avatar
biapar

Forum Moderator, 435 Posts

24 April 2012 at 10:52pm

In your function "newsimage"e you need to limit your for loop.
At your function passing upper limit number.