Here's the code:
<cfsetting enablecfoutputonly="Yes">
<!--- Default to not running in the IGA application. --->
<cfparam name="request.bInApplication" default="0">
<!--- Maximum number of auto-include items to return in menu. --->
<cfset maxAutoInclude = 5>
<!--- Establish the content scope. --->
<cfa_handler object="menu" separator="<p>">
<cfif isArray(menu.item_title)>
<!--- Build nested structure. --->
<cfset aItems = arrayNew(1)>
<cfset ind1 = 0>
<cfloop index="i" from="1" to="#arrayLen(menu.item_title)#">
<cfif menu.item_autoinclude[i] AND request.bInApplication>
<!--- Create the search structure. --->
<cfset stProps = structNew()>
<!--- Check if we need to extract any exnternal data for
sub-menus. --->
<cfswitch expression="#menu.item_autoinclude[i]#">
<cfcase value="1">
<!--- Consumer news general. --->
<cfset typeID = "#application.iga_genNewsTypeID#">
<cfset stProps.content_type = "NEWS">
<cfset stProps.iga_state = "">
</cfcase>
<cfcase value="2">
<!--- Consumer news (state). --->
<cfset typeID = "#application.iga_genNewsTypeID#">
<cfset stProps.content_type = "NEWS">
<cfset stProps.iga_state = "#request.state#">
</cfcase>
<cfcase value="3">
<!--- Retailer news (state). --->
<cfset typeID = "#application.iga_retNewsTypeID#">
<cfset stProps.iga_state = "#request.state#">
</cfcase>
</cfswitch>
<!--- Search for the objects with the supplied
properties. --->
<cfa_contentObjectFind
datasource="#request.cfa.iga_dist.datasource#"
typeID="#typeID#"
bactiveonly="1"
r_stObjects="stContent"
stProperties="#stProps#">
<!--- Sort the items by object label. --->
<cfa_structsortcommonsubkeys
struct="#stContent#"
commonSubKey="attr_DateTimeLastUpdated"
sortType="numeric"
sortOrder="desc"
r_aSortedKeys="aContent">
<!--- Create a structure array of items. --->
<cfset tempArray = arrayNew(1)>
<cfif arrayLen(aContent) GTE maxAutoInclude>
<cfset maxCount = maxAutoInclude>
<cfelse>
<cfset maxCount = arrayLen(aContent)>
</cfif>
<cfloop index="j" from="1" to="#maxCount#">
<cfset tempArray[j] = structNew()>
<cfset tempArray[j].label =
stContent[aContent[j]].title>
<cfset tempArray[j].value =
"#menu.item_url[i]#?objectID=#aContent[j]#">
</cfloop>
</cfif>
<!--- Build the menu definition. --->
<cfswitch expression="#menu.item_level[i]#">
<cfcase value="1">
<!--- Level 1 item. --->
<cfscript>
ind1 = ind1 + 1;
ind2 = 0;
ind3 = 0;
aItems[ind1] = structNew();
aItems[ind1].label = menu.item_title[i];
aItems[ind1].value = menu.item_url[i];
aItems[ind1].aItems = arraynew(1);
</cfscript>
<cfif menu.item_autoinclude[i]>
<cfset aItems[ind1].aItems = tempArray>
</cfif>
</cfcase>
<cfcase value="2">
<!--- Level 2 item. --->
<cfscript>
ind2 = ind2 + 1;
ind3 = 0;
aItems[ind1].aItems[ind2] = structNew();
aItems[ind1].aItems[ind2].label = menu.item_title[i];
aItems[ind1].aItems[ind2].value = menu.item_url[i];
aItems[ind1].aItems[ind2].aItems = arraynew(1);
</cfscript>
</cfcase>
<cfcase value="3">
<!--- Level 3 item. --->
<cfscript>
ind3 = ind3 + 1;
aItems[ind1].aItems[ind2].aItems[ind3] = structNew();
aItems[ind1].aItems[ind2].aItems[ind3].label =
menu.item_title[i];
aItems[ind1].aItems[ind2].aItems[ind3].value =
menu.item_url[i];
</cfscript>
</cfcase>
</cfswitch>
</cfloop>
<!--- Set the menu style. --->
<cfscript>
stNormalStyle = structNew();
stNormalStyle["color"] = "red";
stNormalStyle["font-family"] = "arial";
stNormalStyle["font-size"] = "xx-small";
stHighlightStyle = structNew();
stHighlightStyle["color"] = "red";
stHighlightStyle["font-family"] = "arial";
stHighlightStyle["font-size"] = "xx-small";
stLinkStyle = structNew();
stLinkStyle["color"] = "red";
stLinkStyle["font-family"] = "arial";
stLinkStyle["font-size"] = "xx-small";
</cfscript>
<!--- Title goes here. --->
<cfif len(trim(menu.title))>
<cfoutput>
<cfif len(menu.titleURL)><a
href="#menu.titleURL#"><b>#menu.title#</b></a><cfelse><b>#menu.title#</b></c
fif>
</cfoutput>
</cfif>
<CFA_TREE NAME="genreTree" SKIN="iga"
mode="nav" BSHOWITEMICON=1 BRESET=1 BExpandall=0
aItems="#aItems#"
stNormalStyle="#stNormalStyle#"
stHighlightStyle="#stHighlightStyle#"
stLinkStyle="#stLinkStyle#"/>
</cfif>
</cfa_handler>
-----Original Message-----
From: Spike [mailto:[EMAIL PROTECTED]]
Sent: Monday, 4 June 2001 18:12
To: Spectra-Talk
Subject: RE: Hierachial Menues
His name isn't Archimedes by any chance is it?
Spike
:)
At 10:02 04/06/2001 Monday, you wrote:
>Hi Spike,
>
>Thanks for that, but managed to work it out. The developer working on it,
>went home, hopped into a nice warm bath and it suddenly popped into his
>head.
>
>Thanks again,
>
>Rae
>
>-----Original Message-----
>From: Spike [mailto:[EMAIL PROTECTED]]
>Sent: Monday, 4 June 2001 18:00
>To: Spectra-Talk
>Subject: Re: Hierachial Menues
>
>
>If you are using Spectra 1.5x
>
>Go to:
>
>http://www.allaire.com/handlers/index.cfm?ID=20013
>
>and download the xapp. It has an example of creating a hierarchical menu.
>If you still can't get it to work I have a menu custom tag which I can
>post to you.
>
>Spike
>
>At 00:40 02/06/2001 Saturday, you wrote:
> >Hi Everyone,
> >
> >I am new to the list, but desperate to find a solution.
> >
> >We need to create dynamic three level menu systems, and have not
been able
> >to figure out how using the web top.
> >
> >Does anybody have any suggestions, they would be greatly appreciated.
> >
> >Cheers and thanks in advance,
> >
> >Rae
> >
> >Rae Bailey
> >Internet Media Consultancy Group Pty Ltd
> >02 4963 7855
> >0411 447 430
> >http://www.imcg.com.au
> >
> >Proud supporters of the James Craig Restoration
> >http://www.seaheritage.asn.au/jamescraig
> >
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.