I have just implemented hiermenu into a farcry site.
NOTE:hiermenu only has three levels.
Anyone know how to make this unlimited?I made some minor mods to the custom tag hierbar.cfm (attached) to handle the following: I put the custom tags in farcry\farcry_core\tags\tmt_hiermenu Then put the javascript and css in the appropriate directories off the application www It is implemented as custom tags. I run into problems loop through the site tree query and putting close tags inside a nested cfloop. So I write all the menu takes to a file, then cfinclude the file. code snipped attached. Thoughts? Comments? On Wed, 20 Oct 2004 10:39:11 +0100, Chris Kent <[EMAIL PROTECTED]> wrote: > Kelly and others, > > I have not tried these tags yet, but Massimo Foti has a couple of custom > tags to create navigations menus. Should be very easy to set up and use > within FarCry. > > Check http://www.olimpo.ch/tmt/tag/hiermenu/ for a multi-level menu, can > be set horizontal or vertical. > > Check http://www.olimpo.ch/tmt/tag/expandmenu/sample_advanced.cfm for an > vretical expandable menu, not sure but this might be limited to 2 levels. > > hth, > Chris. > > > > > Kelly Keith wrote: > > I have been using that menu fine on our external website, UNTIL I > > started to work on our intranet. I have a few navigational nodes that do > > not have children..it is giving me errors when I mouseoever (mainly in > > Internet Explorer, which is my main base of users) the menu item. It is > > telling me the error is within the buttonClick function, but the funny > > thing is that I haven't even clicked a button... > > > > Has anyone else come across this problem, if so how did you solve it? > > > > Any help would be greatly appreciated... > > > > Kelly > > > > > > --- > You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > Aussie Macromedia Developers: http://lists.daemon.com.au/ >
<cfscript>
// get navigation elements to root
navFilter=arrayNew(1);
navfilter[1]="status IN (#listQualify(request.mode.lvalidstatus, "'")#)";
// ' !reset colour marking in DW
topmenu =
application.factory.oTree.getDescendants(objectid=application.navid.home, depth=0,
includeSelf=0, afilter=navFilter);
</cfscript>
<cfset fileName = "#GetDirectoryFrompath(GetCurrentTemplatepath())#/menu.cfm">
<cffile action="WRITE" file="#fileName#" output='<cfimport
taglib="/farcry/farcry_core/tags/tmt_hiermenu" prefix="tmt">' addnewline="Yes">
<cffile action="APPEND" file="#fileName#" output='<cfsetting
enablecfoutputonly="yes">' addnewline="Yes">
<cffile action="APPEND" file="#fileName#" output='<cfoutput>' addnewline="Yes">
<cffile action="APPEND" file="#fileName#" output='<tmt:hierbar
css="fw_menu.css">' addnewline="Yes">
<cffile action="APPEND" file="#fileName#" output='<tmt:hieritem id="homeItem"
label="Home" href="index.cfm?objectID=#APPLICATION.navid.home#" title="Back to home
page" />' addnewline="Yes">
<cfset menuOpen = 0>
<cfloop query="topmenu">
<cfif topmenu.recordcount NEQ topmenu.CurrentRow AND
topmenu.NLEVEL[topmenu.CurrentRow + 1] GT topmenu.NLEVEL>
<cfset menuOpen = menuOpen + 1>
<cffile action="APPEND" file="#fileName#"
output='<tmt:hiermenu label="#topmenu.objectName#"
href="index.cfm?objectID=#topmenu.objectID#">' addnewline="Yes">
<!--- menu: #topmenu.objectName# = #menuOpen#<br> --->
<cfelse>
<cffile action="APPEND" file="#fileName#"
output='<tmt:hieritem href="index.cfm?objectID=#topmenu.objectID#"
label="#topmenu.objectName#" />' addnewline="Yes">
<!--- item: #topmenu.objectName#<br> --->
<cfif topmenu.recordcount NEQ topmenu.CurrentRow AND
topmenu.NLEVEL[topmenu.CurrentRow + 1] LT topmenu.NLEVEL>
<cfset r1 = topmenu.NLEVEL[topmenu.CurrentRow + 1] >
<cfset r2 = topmenu.NLEVEL -1>
<cfloop index="ri" from="#r1#" to="#r2#">
<cfset menuOpen = menuOpen - 1>
<cffile action="APPEND" file="#fileName#"
output='</tmt:hiermenu>' addnewline="Yes">
<!--- close [#r1# | #r2#] = #menuOpen#<br> --->
</cfloop>
</cfif>
</cfif>
</cfloop>
<cfif menuOpen GT 0>
<cfloop index="cc" from="#menuOpen#" to="1" step="-1">
<cffile action="APPEND" file="#fileName#" output='</tmt:hiermenu>'
addnewline="Yes">
<!--- close = #cc#<br> --->
</cfloop>
</cfif>
<cffile action="APPEND" file="#fileName#" output='</tmt:hierbar> ' addnewline="Yes">
<cffile action="APPEND" file="#fileName#" output='</cfoutput>' addnewline="Yes">
<cffile action="APPEND" file="#fileName#" output='<cfsetting enablecfoutputonly="no">'
addnewline="Yes">
<cfinclude template="menu.cfm">
hierbar.cfm
Description: Binary data
--- You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
