17488 Posts in 4473 Topics by 1978 members
|Go to End|
12 December 2008 at 11:41am
I'm a web designer, graphic designer that uses silvestripe from a few months ago...
I'm pretty happy with the product, but i have a couple of doubts about structures (control structures), using %if, %elseif, etc.
I've posted several problems here, and find people of the community being very kind, but i want to say that the documentation and reference guide it's a little messy, sometimes i found contents randomly...
In fact i'm trying to use %if properly, and i didn't find any documentation that explains it more in detail (maybe it was my fault). Overall i would improve the way the documentation is displayed on this useful site.
Anyone help regarding %if and multiple if instances would be great, (i'm looking for something ismilar to "swith - case" on php...
Thanks In advance,
12 December 2008 at 4:41pm
The documentation is in the process of being rewritten. Its been mentioned alot but it is happening.. just taking a looong time. As for switch case statements the template parser doesn't handle those. Basicly <% if %>, <% else %> and <% else_if %> is what you have to work with so you can do
<% if X = A %>
X = A!
<% else_if X = B %>
X = B!
<% else_if X = C %>
X = C!
<% else %>
<% end_if %>
|Go to Top|