Hello Nicolas,
This works for me, I
don't have time to explain how it works, but try it.
I'm using the milonic
menu, this is my solution:
To generate the menu (i'm just going down one
level)
Farcry_site/webskin/includes/menutoplevel.cfm
Milonicmenu.cfm
code:
<cfimport
taglib="/farcry/farcry_core/tags/webskin"
prefix="skin">
<cfscript>
navFilter=arrayNew(1);
navfilter[1]="status IN
(#listQualify(request.mode.lvalidstatus,"'")#)";
qNav=application.factory.oTree.getDescendants(objectid=application.navid.home,depth=1,afilter=navFilter);
</cfscript>
with(milonic=new
menuname("Main
Menu")){
style=MenuStyle;
top=43;
left=4;
alwaysvisible=1;
orientation="horizontal";
position="absolute";
<cfscript>navFilter=arrayNew(1);navfilter[1]="status
IN
(#listQualify(request.mode.lvalidstatus,"'")#)";qNav=application.factory.oTree.getDescendants(objectid=application.navid.home,depth=1,afilter=navFilter);</cfscript>
<cfoutput>
aI("text=HOME ;image=image.gif;overimage=menu/image_over.gif;url=""><cfloop
query="qNav">
aI("text=#Ucase(qNav.objectname)# ;showmenu=#qNav.objectname#;image=image.gif;overimage=image_over.gif;url=""></cfloop>
<cfif
Isdefined("session.dmSec.authentication.userLogin")>
aI("text=LOGOUT ;showmenu=logout;image=image.gif;overimage=image_over.gif;url=""><cfelse>
;
</cfif>
</cfoutput>
}
drawMenus();
In
my header.cfm (where my menu
is)
Farcry_site/webskin/includes/header.cfm
Inside the head-tag
<SCRIPT language=_javascript_
src=""
type=text/_javascript_></SCRIPT>
<script language=_javascript_>
if(ns4)_d.write("<scr"+"ipt
language=_javascript_
src=""> else
_d.write("<scr"+"ipt language=_javascript_
src=""
</script>
<SCRIPT
language=_javascript_ src=""
type=text/_javascript_></SCRIPT>
Inside the
body-tag
<script>
<cfmodule
template="/farcry/#application.applicationname#/webskin/includes/menutoplevel.cfm">
</script>
And i have
another file in the www folder:
Farcry_site/www/buildmenu.cfm
<cfimport taglib="/farcry/farcry_core/tags/webskin"
prefix="skin">
_menuCloseDelay=500
// The time delay for menus to remain visible on mouse
out
_menuOpenDelay=150
// The time delay before menus open on mouse
over
_subOffsetTop=0
// Sub menu top
offset
_subOffsetLeft=10
// Sub menu left offset
with(MenuStyle=new
mm_style()){
;
;
offbgcolor="#BDC3D3";
offcolor="#FFFFFF";
bordercolor="#FFFFFF";
borderstyle="solid";
borderwidth=1;
separatorcolor="white";
separatorsize="1";
padding=4;
fontsize="12px";
fontstyle="normal";
fontweight="bold";
fontfamily="Arial,
Helvetica,
sans-serif";
}
<cfscript>
navFilter=arrayNew(1);
navfilter[1]="status
IN
(#listQualify(request.mode.lvalidstatus,"'")#)";
qNav=application.factory.oTree.getDescendants(objectid=application.navid.home,depth=1,afilter=navFilter);
</cfscript>
<cfoutput>
<cfloop
query="qNav">
<cfscript>
// get navigation
elements
navFilter=arrayNew(1);
navfilter[1]="status IN
(#listQualify(request.mode.lvalidstatus, "'")#)";
qNavSec =
application.factory.oTree.getDescendants(objectid=qNav.objectid, depth=1,
afilter=navFilter);
</cfscript>
<cfif qNavSec.objectname neq
"">
with(milonic=new
menuname("#qNav.objectname#")){
style=MenuStyle;
position="absolute";
<cfoutput>
<cfloop
query="qNavSec">
aI("text= #qNavSec.objectname# ;url=""> </cfloop>
}
</cfoutput>
</cfif>
</cfloop>
</cfoutput>
drawMenus();
-----Opprinnelig
melding-----
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] P� vegne av n.
Sendt: 24. juni 2004 14:53
Til: FarCry
Developers
Emne: [farcry-dev] Milonic menu
integration
Hello,
I'm trying to integrate the Milonic HierMenu
navigation script into our
(first) FarCry project and I can't get the script
to work (even with only static cotnent): it generates multiple Js errors.
The
strange thing is that, if I put the same (static) content in a .htm file at the
root of my \farcry\MY-PROJECT\www\ folder, it works just fine!
I suspect it's
the floatingFarCry toolbox that interacts withthe Milonic Menu...
Did
anyone encounter this type of problem?
Better yet: is there an example of
a Milonic menu implementation we could start from? I haven't found much in The
Mail Archive on this.
Thanks for your
help!
Nicolas.
--
n | walking
men
| nicolas glinoer
| tel02.412.02.51
|
fax02.411.42.46
|
[EMAIL PROTECTED]
| neeeew
www.walkingmen.com
---
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/
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/
