Jump to:

3434 Posts in 1026 Topics by 866 members

Template Questions

SilverStripe Forums » Template Questions » Syntax problem in IF control

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

Page: 1 2
Go to End
Author Topic: 1975 Views
  • J2-Paul
    Avatar
    Community Member
    51 Posts

    Re: Syntax problem in IF control Link to this post

    I see your point. However, it still does not work with the quotes excluded.

    The workaround is fine for now.

    Thanks all for you help!

    Paul

  • bartvanirsel
    Avatar
    Community Member
    94 Posts

    Re: Syntax problem in IF control Link to this post

    In my templates the quotes do work, but i see the SS documentation tells not to use them.

    Interesting issue for the Silverstripe devs?

  • bartvanirsel
    Avatar
    Community Member
    94 Posts

    Re: Syntax problem in IF control Link to this post

    Maybe best practice is to use a method in your controller always when things are getting 'more complicated' and you don't want this logic inside your view.

  • J2-Paul
    Avatar
    Community Member
    51 Posts

    Re: Syntax problem in IF control Link to this post

    I think you are correct. My understanding is that templates should be keep as simple as possible with as much logic as possible in the controller.

    I am sure this is what they would say if they joined this thread. Be good if this could be confirmed, elborated on ....SS guys?

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