21305 Posts in 5736 Topics by 2603 members
General Questions
SilverStripe Forums » General Questions » Split control loop into 2 columns/ footer menus/ multi column lists
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 768 Views |
-
Split control loop into 2 columns/ footer menus/ multi column lists

6 January 2011 at 4:38pm
Hi all,
not sure if this is the BEST way to do it, but i just spent half an hour searching the forums and have managed to put this together, so thought i'd share!
i wanted to list some items in a footer menu, using control of page URL.
but there were too many for one column, so i wanted to split the list.here's what i did:
<dl>
<dt>Properties</dt><% control Page(properties) %>
<% control Children %><dd> <a title="$Title" href="$Link">$Title</a></dd>
<% if Pos = 4 %>
</dl>
<dl>
<% end_if %>
<% end_control %>
<% end_control %>
</dl>so now, it lists 4 items, then closes the list and starts a new one, then continues the control loop.
once it runs out of items to list, it closes and ends.works perfectly for my needs!
but if anybody knows a cleaner solution please do share.
| 768 Views | ||
|
Page:
1
|
Go to Top |

