2985 Posts in 761 Topics by 740 members
Template Questions
SilverStripe Forums » Template Questions » find page siblings within <% control Children %>
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 769 Views |
-
find page siblings within <% control Children %>

22 October 2010 at 3:22am
Hi,
perhaps someone can help me to find a way to link to an element sibling regardless of where I am.
I want to display multiple pages on one webpage - navigating with a javascript scroller, like http://demos.flesler.com/jquery/localScroll/
Using the navigation, everything works fine but building the pager within those child elements seems to be complicated.
<% control Children %>
<div class="section">
<ul>
<li class="sub" id="$URLSegment">
<h1>$URLSegment - Headline</h1>
$Content
<%-- PREV SIBLING NEXT --%>
</li>
</ul>
</div>
<% end_control %>Any Idea?
Thanks much in advance
patte -
Re: find page siblings within <% control Children %>

28 October 2010 at 10:45pm
Totally untested or reasearched idea, but why not try getChildrenAsUL(), partialTreeAsUL() or SiteTreeAsUL() to get you the UL straigh away?
| 769 Views | ||
|
Page:
1
|
Go to Top |


