3402 Posts in 979 Topics by 855 members
|Go to End|
18 June 2010 at 6:50pm
Ask and you shall receive - http://doc.silverstripe.org/templates#modulus_and_multipleof.
We're trying to be proactive with the docs. A huge effort is taking place to rebuilt and rewrite, tidy up so if you see something missing that should be documented (like this) throw up a ticket to open.silverstripe.org. We will be dealing with those in the coming months.
I personally at least get carried away with new features and code and because I know it, everyone else must know it but I'm attempting to change such bad habits
8 October 2010 at 12:15pm Last edited: 8 October 2010 12:15pm
Modulus and multipleof are great. I'm trying to use them to detect the first and last items in a row of four columns, but...
<% if MultipleOf(4) %> I'm a multiple of 4 <% end_if %>
<% if MultipleOf(4, 3) %> Anything as a second parameter breaks <% end_if %>
I cannot see why I cannot pass the second parameter, anyone?
17 November 2011 at 11:44pm Last edited: 17 November 2011 11:46pm
Agree to kcd's issue. Same Problem. Inside a loop
the following works:
(every 3rd Element starting by 1 => 1,4,7,10....)
the following does not:
(results in Parse error: syntax error, unexpected '}' in....)
<% if MultipleOf(3,3) %>
Any ideas would be great ...
|Go to Top|