Mike - I do almost the same thing Dave recommended.  (It took me awhile to
grasp how these work too - - and I am still learning new things you can
accomplish through these methods.)  But what I do - - 

>From my webpage - I call menu.cfm through the module tag, passing in items
like - what page is it associated to (if not the home page), the menu title
and The CURRENT Page calling the tag, etc (These help me with formatting):

  <cfmodule 
     template="menu.cfm"
     AssocPageID="#GetPageContent.PageID#"
     MenuTitle="#GetPageContent.Title#"
     ThisPageID="#GetPageContent.PageID#">

Then in my Menu page - I setup various attributes:

<!--- For Main --->
<cfparam name="Attributes.ThisPageID" default="0">
<cfparam name="Attributes.MenuTitle" default="">

<!--- For Sub--->
<cfparam name="Attributes.AssocPageID" default="0">

<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>

***Then  I do a bunch of Queries based on the info passed  - - following is
simplified***

<cfquery name="qryGetAllMenu" datasource="#Application.DSN#"
username="#Application.username#" password="#Application.password#">
SELECT ContentMenu.PageID, Content.Title, ContentMenu.AssocID,
ContentMenu.Sort
FROM ContentMenu, Content
WHERE ContentMenu.AssocID = '0'
AND Content.PageID = ContentMenu.PageID
AND Content.Active = 1
ORDER BY Sort ASC
</cfquery>


<div id="SiteNavContainer">
    <ul>
        <li <cfif IsDefined("CurrentPage") AND #CurrentPage# EQ
"index.cfm">id="current"</cfif>><a
href="<cfoutput>#Application.WebRoot#</cfoutput>index.cfm"
target="_parent"><span>Home</span></a></li>
        <cfloop query="qryGetAllMenu">
            <cfoutput>
                <li ><a
href="#Application.WebRoot#content.cfm?PageID=#PageID#"
target="_parent"<cfif #CurrentPage# EQ "content.cfm" AND
IsDefined("Attributes.ThisPageID") AND #Attributes.ThisPageID# EQ
#qryGetAllMenu.PageID#>id="current"</cfif>><span>#Title#</span></a></li>
            </cfoutput>
        </ul>
</div>


Then I can style the DIV and LIST with CSS to look like whatever I want. 

I hope that helps.

- Nick



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4569
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to