OK, I am trying to make a dynamic collabsable menu system. The links show up
fine, but the collapse/Expand parts are not working. Every link shows,
parent and child.
Here is the code:


<!--- Get a list of the site navigation from the tblPages table--->
<cfinvoke
         component="CFC.SiteQueries"
         method="getSiteNavigation"
         returnvariable="getSiteNavigationRet">
    </cfinvoke>


<!--- Loop through the getPagesRet result from query on header --->
    <cfloop list="#getPagesRet.hierarchy#" delimiters="~" index="i">
<!--- Get a listing of the pages form the tblPages table --->
<cfinvoke
             component="CFC.Admin"
             method="getPages"
             returnvariable="getPagesRet2">
                <cfinvokeargument name="ID" value="#i#"/>
        </cfinvoke>
  </cfloop>

<!--- Set the baseID --->
<cfif ListLen(getPagesRet2.Hierarchy, "~") GT 1>
      <cfset BaseID = #ListGetAt(getPagesRet2.HIERARCHY, 2, "~")#>
    <cfelse>
     <cfset BaseID = 1>
    </cfif>

        <cfoutput query="getSiteNavigationRet">
          <cfif ListLen(getSiteNavigationRet.HIERARCHY, "~") GT 1>
             <cfif ListGetAt(getSiteNavigationRet.HIERARCHY, 2, "~") EQ
BaseID>
                 <cfloop from="2" to="#ListLen(
getSiteNavigationRet.HIERARCHY, "~")#" index="i">
                     -<a target="_self"
href="Default.cfm?ID=#getSiteNavigationRet.ID#"
title="#Title#">#Title#</a><BR />
                    </cfloop>
                    <!--- This should be the non-expanded menu. --->
                <cfelseif ListLen(getSiteNavigationRet.HIERARCHY, "~") EQ 2>

                 - <a href="Default.cfm?ID=#getSiteNavigationRet.ID#"
title="#Title#" target="_self">#Title#</a><BR />
                </cfif>
            <cfelse>
    <!--- Show the home page link --->
             <a href="Default.cfm?ID=#getSiteNavigationRet.ID#"
title="#Title#">#Title#</a><BR />
            </cfif>
        </cfoutput>
        <a href="SiteMap.cfm" title="Site Map">Site Map</a><BR />
        <a href="http://cmail.snowline.k12.ca.us";
target="_blank">CMAIL</a><BR />
        <a href="Admin/Login.cfm">Log In</a>


-- 
Bruce


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285968
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to