here's some sample code I use for the menu on www.galvestongetaway.com using
<cf_tree>
The table in the datasource is as follows:
ItemID (AutoNumber)
Description (Text)
FuseAction (Text)
ParentItemID (Number)
dsp_sidebar.cfm
<CFQUERY NAME="Qry_Menu" DATASOURCE="#request.MainDSN#" DBTYPE="ODBC">
Select ItemID, Description, Fuseaction, ParentItemID, ItemID AS Self
>From tblMenu
Where
ParentItemID IN (#attributes.categorylist#)
</CFQUERY>
<CF_MAKETREE QUERY = "#qry_menu#" POSITION="0" DESCRIPTION = "Menu">
<!-------------------------------------------------------------->
<CFOUTPUT QUERY="maketree">
<TR VALIGN="top" ALIGN="left">
<TD NOWRAP ALIGN="left">
<CFIF #INDENT# GT 0>
<CFLOOP FROM="1" TO="#indent#" INDEX="i">
</CFLOOP>
<A
HREF="http://#CGI.Server_Name#/#request.webroot#index.cfm/categorylist/#pare
ntlist#,#itemID#/<cfif ((#itemID# GT 200) AND (#itemID# LTE
299))>PrLocID/#Self#/<CFELSEIF ((#itemID# GT 300) AND (#itemID# LTE
399))>PrTypeID/#Self#/</CFIF>#fusetoken#" TITLE="#Description#"
CLASS="menulink2" STYLE="a.hover:##FFFF00;"><B><IMG
SRC="#request.imagesroot#/anchor.gif" ALIGN="top" BORDER=0
ALT=""> #description#</B></A>
<CFELSE>
<A
HREF="http://#CGI.Server_Name#/#request.webroot#index.cfm/categorylist/#pare
ntlist#,#itemID#/#fusetoken#" TITLE="#Description#" CLASS="menulink"><B><IMG
SRC="#request.imagesroot#/wheel.gif" ALIGN="top" BORDER=0
ALT=""> #description#</B></A>
</CFIF>
</TD>
</TR>
</CFOUTPUT>
now at the top of the index.cfm you can have something like this:
index.cfm
<!--- right at the top --->
<CFINCLUDE TEMPLATE="app_locals.cfm">
<CFPARAM NAME="attributes.fuseaction" DEFAULT="MAIN">
<!--- for calling the menu and defining the resulting fuseaction --->
<CFPARAM NAME="attributes.categorylist" TYPE="String" DEFAULT=0>
<CFIF #LISTLAST(ATTRIBUTES.CATEGORYLIST)# GT 0>
<CFINCLUDE
TEMPLATE="#request.cfroot#queries/qry_getCalledFuseAction.cfm">
<CFOUTPUT QUERY="qry_GetFuseActionByMenuItem">
<CFSET ATTRIBUTES.FUSEACTION = "#fuseaction#">
</CFOUTPUT>
</CFIF>
you may want to convert it from the search engine friendly URLs though. but
instead of fuseaction= you'll have a categorylist=0,2,3,5 with the last
number being the current menu choice. kind of gives you a breadcrumb trail
in the url.
Enjoy
Fred T. Sanders
Charlottesville, VA
-------------------------------------------
I'm going to go write some angry code now.
----- Original Message -----
From: "Douglas M. Smith" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Thursday, October 05, 2000 11:43 AM
Subject: <CF_TREE>
> <CF_TREE>
>
> I noticed this tag in the library of standard Fusebox tags in the CD that
was given out at the recent Fusebox conference.
>
> Does anybody know what this tag is for? I could not find any other
references to it.
>
> Thanks!
>
> Douglas Smith
>
>
> ====================================================
> Douglas M. Smith - Database Architect/Web Integration Specialist
> ====================================================
> TeraTech Inc - Tools for Programmers(tm)
> VisualBasic, Web (ColdFusion and ASP), Math and Statistics,
> Access, SQL, programming tools & consulting
> 100 Park Ave, Suite 360, Rockville MD 20850 USA
> Voice: 301-424-3903, Fax: 301-762-8185
> http://www.teratech.com
> ====================================================
> Email: [EMAIL PROTECTED]
> Mobil/Cell Phone: (240) 601-5520
> ICQ: 41044319
> ====================================================
> Do you need a group calendar or scheduler?
> How about a free ColdFusion Tag and Function Reference?
> Go to http://www.teratech.com/freestuff.cfm
> ====================================================
>
> --------------------------------------------------------------------------
----
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.