For other noobs like me that are looking at how to create a navigation menu
with sub nav, here is an example I created below. I couldn't get
r:navigation to do it or the navigation_tags extension to work properly.

I'm sure there is a better way to do this so please offer your suggestions
on how to do this if you know of a better way.

<ul>
<r:find url="/">
  <r:children:each>
    <r:unless_content part="no-nav">
      <r:if_ancestor_or_self>
        <r:if_self>
          <li class="current"><r:link />
        </r:if_self>
        <r:unless_self>
          <li class="current with-children"><r:link />
        </r:unless_self>
            <r:if_children>
              <ul>
                <r:children:each>
                  <r:if_self>
                    <li class="current"><r:link /></li>
                  </r:if_self>
                  <r:unless_self>
                    <li><r:link /></li>
                  </r:unless_self>
                </r:children:each>
              </ul>
            </r:if_children>
        </li>
      </r:if_ancestor_or_self>
      <r:unless_ancestor_or_self>
        <li><r:link /></li>
      </r:unless_ancestor_or_self>
    </r:unless_content>
  </r:children:each>
</r:find>
</ul>
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to