AnsweredAssumed Answered

Section Menu

Question asked by foosetv on Mar 8, 2011
Latest reply on Mar 9, 2011 by bremmington
I'm looking for some help with the syntax in making a menu for a WCMQS site. What I'm looking to do is have a menu that lists only the first level of sections within a particular section. For instance I want the menu to list all the sections underneath the "news" section and to display them when I'm in any page in the news section including any of the news' nested sections. I've had some limited success with this:


<#list section.sections as section>
     <#if ! section.excludeFromNav>
          <li><a href="${url.context}${section.path}"><#if section.title?? && section.title?length gt 0>${section.title}<#else>${section.name}</#if></a>   
          </li>
     </#if>
</#list>
While this works when on a root level for the section, it does not work when you are in a nested section because it us looking for another set of nested sections. Is there a way in the Freemarker list tag to reference the parent section or reference a specific section by name or level (in a nested sence)? The only two references I know of are webSite.sections for the root folders and section.sections for the current section.

Outcomes