3215 Posts in 848 Topics by 811 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 215 Views |
-
start position of the loop

28 February 2013 at 2:08pm Last edited: 28 February 2013 2:34pm
I have this code, and if the pagetype is page, i want to start the loop at the position 4. I am trying $modulus, but the result is not the expected.
This should be simple, right?
<% if ClassName = Page %>
<% loop $Menu(1) %>
<% if not $Modulus(5) %>
<li class="$LinkingMode triangle-isosceles top buble-$Pos">
<a href="$Link" title="$Title.XML">$MenuTitle.XML</a>
</li>
<% end_if %>
<% end_loop %>
<% end_if %> -
Re: start position of the loop

28 February 2013 at 8:48pm
Modulus doesn't work like that (http://en.wikipedia.org/wiki/Modular_arithmetic).
If you want to alter the start to skip the first 4, one way you could do is use Limit() - <% loop $Menu(1).Limit(100, 4) %>
| 215 Views | ||
|
Page:
1
|
Go to Top |


