Skip to content

Instantly share code, notes, and snippets.

@farmerbradllc
Created February 2, 2015 14:38
Show Gist options
  • Save farmerbradllc/b9837cf26e15749cce46 to your computer and use it in GitHub Desktop.
Save farmerbradllc/b9837cf26e15749cce46 to your computer and use it in GitHub Desktop.
Current Page and children Sitemap ADT
#set ($specialPlid = "")
#if ($layout.getParentPlid() == 0)
#set ($specialPlid = $layout.getPlid())
#else
#set ($specialPlid = $layout.getParentPlid())
#end
<div class="nav-menu nav-menu-style-">
#if (!$entries.isEmpty())
#foreach ($curPage in $entries)
#if($curPage.getPlid() == $specialPlid)
<h2><a href=".$curPage.getFriendlyURL($locale)">$curPage.getName($locale)</a></h2>
#if ($curPage.hasChildren())
<ul class="layouts level-1">
#foreach ($child in $curPage.getChildren())
<li><a href="$child.getFriendlyURL()">$child.getName($locale)</a>
#if ($child.hasChildren())
<a class="toggle-dropdown" href=""></a>
<ul class="layouts level-2">
#foreach ($grand in $child.getChildren())
<li><a href="$grand.getFriendlyURL($locale)">$grand.getName($locale)</a></li>
#end
</ul>
#end
</li>
#end
</ul>
#end
</li>
#end
#end
</ul>
#end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment