Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » How to do a <= check in template

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 3038 Views
  • Sec
    Avatar
    Community Member
    13 Posts

    How to do a <= check in template Link to this post

    Hello.

    I would like to do a test like this:

    <% if $Pos <= 4 %>
    ...

    Is this possible in the ss template?

  • jam13
    Avatar
    121 Posts

    Re: How to do a <= check in template Link to this post

    If <= works (which I'm not sure of) then it would be:

    <% if Pos <= 4 %>

    i.e. without the $

    If not, and $Pos is an integer, can't you do < 5?

    3038 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.