Jump to:

3439 Posts in 1028 Topics by 869 members

Template Questions

SilverStripe Forums » Template Questions » Limit <% control %> items

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1093 Views
  • carlo
    Community Member
    5 Posts

    Limit <% control %> items Link to this post


    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) %>
    <% end_control %>

  • biapar
    Forum Moderator
    435 Posts

    Re: Limit <% control %> items Link to this post

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

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.