Don't print property group menu container elements if there are no property groups to display in the menu

This commit is contained in:
rjy7 2011-01-13 15:55:34 +00:00
parent a25efc8bd4
commit 01e6cf274c

View file

@ -4,15 +4,21 @@
<#assign nameForOtherGroup = nameForOtherGroup!"other"> <#assign nameForOtherGroup = nameForOtherGroup!"other">
<nav id="property-group-menu" role="navigation"> <#if (propertyGroups.all)??>
<ul role="list"> <#assign groups = propertyGroups.all>
<#list propertyGroups.all as group>
<#assign groupname = group.name(nameForOtherGroup)> <#if groups?has_content>
<#if groupname?has_content> <nav id="property-group-menu" role="navigation">
<#-- capitalize will capitalize each word in the name; cap_first only the first. We may need a custom <ul role="list">
function to capitalize all except function words. --> <#list groups as group>
<li role="listitem"><a href="#${groupname}">${groupname?capitalize}</a></li> <#assign groupname = group.name(nameForOtherGroup)>
</#if> <#if groupname?has_content>
</#list> <#-- capitalize will capitalize each word in the name; cap_first only the first. We may need a custom
</ul> function to capitalize all except function words. -->
</nav> <li role="listitem"><a href="#${groupname}">${groupname?capitalize}</a></li>
</#if>
</#list>
</ul>
</nav>
</#if>
</#if>