Jump to:

23370 Posts in 18160 Topics by 2864 members

General Questions

SilverStripe Forums » General Questions » Control ($Pos - 1)

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 795 Views
  • web2works
    Avatar
    Community Member
    50 Posts

    Control ($Pos - 1) Link to this post

    Hi, I need to $Pos inside a control to start counting at 0. How would I do this without having loads of $Pos == 2 %>1 , $Pos == 3 %>2, etc

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: Control ($Pos - 1) Link to this post

    $Pos(0) should work (the argument is the number to start counting from, defaults to 1).

    795 Views
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.