Skip to content

Instantly share code, notes, and snippets.

@farmerbradllc
Created August 9, 2012 18:26
Show Gist options
  • Select an option

  • Save farmerbradllc/3306823 to your computer and use it in GitHub Desktop.

Select an option

Save farmerbradllc/3306823 to your computer and use it in GitHub Desktop.
display footer navigation
## ---------- Footer Custom Field ---------- ##
#set ($customFieldName = "footer-navigation")
#if ($layout.getExpandoBridge().hasAttribute($customFieldName) == false)
#set($VOID = $layout.getExpandoBridge().addAttribute($customFieldName, 1, false))
#end
<nav class="$nav_css_class" id="navigation">
<h1>
<span>#language("navigation")</span>
</h1>
<ul>
#foreach ($nav_item in $nav_items)
#if($nav_item.getLayout().getExpandoBridge().getAttribute($customFieldName) == false)
#if ($nav_item.isSelected())
<li class="selected">
#else
<li>
#end
<a href="$nav_item.getURL()" $nav_item.getTarget()><span>$nav_item.icon() $nav_item.getName()</span></a>
#if ($nav_item.hasChildren())
<ul class="child-menu">
#foreach ($nav_child in $nav_item.getChildren())
#if ($nav_child.isSelected())
<li class="selected">
#else
<li>
#end
<a href="$nav_child.getURL()" $nav_child.getTarget()>$nav_child.getName()</a>
</li>
#end
</ul>
#end
</li>
#end
#end
</ul>
</nav>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment