Jump to:

23493 Posts in 18996 Topics by 2878 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: 832 Views
  • web2works
    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
    Forum Moderator
    473 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).

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.