Jump to:

23451 Posts in 18899 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » or clause

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 2
Go to End
Author Topic: 1631 Views
  • Fuzz10
    Community Member
    787 Posts

    Re: or clause Link to this post

    wOOt !! ;) Hahah..

    You have to be kidding .. Since when ?

  • johnmblack
    Community Member
    61 Posts

    Re: or clause Link to this post

    @ajshort -- This does not work for me.

    <% if Prop1 || Prop2 || Prop3 || Prop4 %>
    ...do something
    <% end_if %>

    throws PHP error, Parse error: syntax error, unexpected T_ELSE

    Did the SS implementation change since last year that would make this stop working?

  • Willr
    Forum Moderator
    5497 Posts

    Re: or clause Link to this post

    @johnmblack for 2.4 you can only a single or clause - prop1 || prop2 should would but you can't include any more. This has been changed in 3.0 to support 2 or more.

Page: 1 2
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.