Brendan,

Thanks - that removed the need for the qNav3.

The qNav2 is still required as this gets all the children for a node to build the sub menu.

Chris.

Brendan Sisson wrote:


Chris Kent wrote:


<!--- Parse all nodes in tree --->
<cfset qNav = application.factory.oTree.getDescendants(objectID=#application.navid.home#)>




<cfloop query="qnav">
<!--- Get children if any --->
<cfset qNav2 = application.factory.oTree.getChildren(objectID=#qNav.objectID#)>


    <!--- Create a sub menu --->
    <cfif qNav2.recordcount gt 0>



To check if a node has children you can simply use the nLeft and nRight values from the nested tree table. If you do a dump of qNav you will see nLeft,nRight and nLevel are returned in the query object. If a node has children nRight-nLeft will be greater than 1.


<cfloop query="qnav">
    <!--- Create a sub menu --->
    <cfif qNav.nRight - qNav.nLeft gt 1>

-Brendan
http://farcry.daemon.com.au



--- You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to