Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

Syntax problem in IF control


Go to End


12 Posts   3949 Views

Avatar
J2-Paul

Community Member, 51 Posts

20 October 2010 at 11:41pm

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

Avatar
bartvanirsel

Community Member, 96 Posts

21 October 2010 at 12:12am

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

Interesting issue for the Silverstripe devs?

Avatar
bartvanirsel

Community Member, 96 Posts

21 October 2010 at 12:17am

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.

Avatar
J2-Paul

Community Member, 51 Posts

21 October 2010 at 12:20am

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?

Go to Top