This discussion is archived
4 Replies Latest reply: Sep 25, 2013 3:57 AM by 4e6db362-839a-498c-b90e-7ac6fa25d1a6 RSS

How to create multi level menu?

995077 Newbie
Currently Being Moderated
I have created single level navigation bar. Now I want to create a multi level navigation bar.
Can anyone have an idea how we can achieve this?

  • 1. Re: How to create multi level menu?
    JoeScanlon Newbie
    Currently Being Moderated
    can you post the code you used?
  • 2. Re: How to create multi level menu?
    995077 Newbie
    Currently Being Moderated
    I have used avisports -->RenderChildren code for rendering immediate child in menu bar.
    <%@ taglib prefix="cs" uri="futuretense_cs/ftcs1_0.tld"
    %><%@ taglib prefix="asset" uri="futuretense_cs/asset.tld"
    %><%@ taglib prefix="assetset" uri="futuretense_cs/assetset.tld"
    %><%@ taglib prefix="commercecontext" uri="futuretense_cs/commercecontext.tld"
    %><%@ taglib prefix="ics" uri="futuretense_cs/ics.tld"
    %><%@ taglib prefix="listobject" uri="futuretense_cs/listobject.tld"
    %><%@ taglib prefix="render" uri="futuretense_cs/render.tld"
    %><%@ taglib prefix="siteplan" uri="futuretense_cs/siteplan.tld"
    <ics:if condition='<%=ics.GetVar("seid")!=null%>'><ics:then><render:logdep cid='<%=ics.GetVar("seid")%>' c="SiteEntry"/></ics:then></ics:if>
    <ics:if condition='<%=ics.GetVar("eid")!=null%>'><ics:then><render:logdep cid='<%=ics.GetVar("eid")%>' c="CSElement"/></ics:then></ics:if>
         <ics:ifempty variable="pageId">
              <ics:setvar name="pageId" value='<%=ics.GetVar("cid") %>' />
         <asset:load name="page" type="Page" objectid='<%=ics.GetVar("pageId") %>' />
         <asset:getsitenode name="page" output="pageNodeId"/>
         <siteplan:load name="pageNode" nodeid='<%=ics.GetVar("pageNodeId") %>' />
         <siteplan:children name="pageNode" list="level1Children" code="Placed" order="nrank" />
         <ics:listloop listname="level1Children">
              <ics:listget listname="level1Children" fieldname="oid" output="childId" />
              <assetset:setasset name="child" type="Page" id='<%=ics.GetVar("childId")%>' />
              <assetset:getattributevalues name="child" attribute="title" listvarname="title" typename="PageAttribute" />
              <asset:list list="pageList" field1="id" value1='<%=ics.GetVar("childId") %>' type="Page" />
              <render:callelement elementname="avisports/Page/GetLink" scoped="global">
                   <render:argument name="assetid" value='<%=ics.GetVar("childId") %>' />
              <ics:listget listname="title" fieldname="value" output="title" />
              <ics:ifempty variable="title">
                   <ics:listget listname="pageList" fieldname="name" output="title" />
              <li>"><span><ics:getvar name="title" /></span><em class="arrow"> </em></a></li>
              <ics:removevar name="title" />



    Edited by: 992074 on Apr 10, 2013 12:46 AM
  • 3. Re: How to create multi level menu?
    JoeScanlon Newbie
    Currently Being Moderated
    Change from <siteplan:children to <siteplan:list pages and set the level to how deep you want to go. You can then iterate thru your results and draw out your navigation
  • 4. Re: How to create multi level menu?
    4e6db362-839a-498c-b90e-7ac6fa25d1a6 Newbie
    Currently Being Moderated



    I tried to retrieve the child pages using <siteplan:listpages  and iterated thru that list to get the child nodes. But im getting null values for the same. If im using <siteplan:children> iam able to retrieve the first level child nodes.

    The code i am using is given below. Could u tell me where i went wrong?


    <siteplan:load name="pageNode" nodeid='<%=ics.GetVar("theNodeId") %>' />

    <siteplan:listpages name="pageNode" placedlist="Children" level="3" />


    <ics:listloop listname="Children">

      <ics:listget listname="Children" fieldname="oid" output="childId" />



    The list 'Children' has values, because the loop is getting executed as many number as of the child nodes.





  • Correct Answers - 10 points
  • Helpful Answers - 5 points