Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:32

Database Driven Menu aaaaarrrgghhh


Poster: steveclements
Dated: Wednesday April 21 2004 - 17:19:11 BST

I am geting a serious headache and complex trying to understand how to run a menu system using a database. I have hunted thoughout the forums and found some interesting and helpful posts on this subject but they all seem (to me) to stop too early. I am using the code below and the menu is listed correctly (submenus and all) but there are a couple of key things I wish to do which I cannot work ut how to do.

1. Have a link on the Main top menu as well as a submenu. (I have looke at the Alt-URL but I will be blowed if I can find where to put this)

2. Open a link into a new browser window (preferably wihtout the toolbars) I know how to do this in normal pages but cannot wedge the code in here.

I know there is a multitude of properties that can be applied to a Milonic Menu but are these ALL available in the code below?

Please please please...someone help me get over this hurdle.





The code I'm using, coutersy on this forum is :


<SCRIPT language=JavaScript src="menu_array.js" type=text/javascript></SCRIPT>
<script language="JavaScript" type="text/javascript">
////////////////////////////////////
// Editable properties START here //
////////////////////////////////////

{
effect = "Fade(duration=0.2);Alpha(style=0,opacity=88);"//Shadow(color='#777777', Direction=135, Strength=0)"
}
else
{
effect = "Shadow(color='#777777', Direction=135, Strength=5)" // Stop IE5.5 bug when using more than one filter
}


timegap=500 // The time delay for menus to remain visible
followspeed=5 // Follow Scrolling speed
followrate=40 // Follow Scrolling Rate
suboffset_top=10; // Sub menu offset Top position
suboffset_left=20; // Sub menu offset Left position

style1=[ // style1 is an array of properties. You can have as many property arrays as you need. This means that menus can have their own style.
"ffffff", // Mouse Off Font Color
"666666", // Mouse Off Background Color
"cc0000", // Mouse On Font Color
"999999", // Mouse On Background Color
"666666", // Menu Border Color
9, // Font Size in pixels
"normal", // Font Style (italic or normal)
"bold", // Font Weight (bold or normal)
"Verdana, Arial", // Font Name
5, // Menu Item Padding
"", // Sub Menu Image (Leave this blank if not needed)
, // 3D Border & Separator bar
"ffffff", // 3D High Color
"666666", // 3D Low Color
"Purple", // Current Page Item Font Color (leave this blank to disable)
"pink", // Current Page Item Background Color (leave this blank to disable)
"", // Top Bar image (Leave this blank to disable)
"ffffff", // Menu Header Font Color (Leave blank if headers are not needed)
"", // Menu Header Background Color (Leave blank if headers are not needed)
]



addmenu(menu=[ // This is the array that contains your menu properties and details
"mainmenu", // Menu Name - This is needed in order for the menu to be called
84, // Menu Top - The Top position of the menu in pixels
15, // Menu Left - The Left position of the menu in pixels
84, // Menu Width - Menus width in pixels
0, // Menu Border Width
, // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
style1, // Properties Array - this is set higher up, as above
1, // Always Visible - allows the menu item to be visible at all time (1=on/0=off)
"center", // Alignment - sets the menu elements text alignment, values valid here are: left, right or center
effect, // Filter - Text variable for setting transitional effects on menu activation - see above for more info
, // Follow Scrolling - Tells the menu item to follow the user down the screen (visible at all times) (1=on/0=off)
1, // Horizontal Menu - Tells the menu to become horizontal instead of top to bottom style (1=on/0=off)
, // Keep Alive - Keeps the menu visible until the user moves over another menu or clicks elsewhere on the page (1=on/0=off)
, // Position of TOP sub image left:center:right
, // Set the Overall Width of Horizontal Menu to 100% and height to the specified amount (Leave blank to disable)
, // Right To Left - Used in Hebrew for example. (1=on/0=off)
, // Open the Menus OnClick - leave blank for OnMouseover (1=on/0=off)
, // ID of the div you want to hide on MouseOver (useful for hiding form elements)
, // Reserved for future use
, // Reserved for future use
, // Reserved for future use
<%
dim oConnect, oMenuRoot, oSub
Set oConnect = Server.CreateObject("ADODB.Connection")
oConnect.Open MM_ecos2004_STRING
set oMenuRoot = oConnect.execute("selectTOCroot")
set oMenuSub = oConnect.execute("selectTOCsub")
'ROOT MENU
do until oMenuRoot.eof
response.write ",""" & oMenuRoot("label") & ""","""
if oMenuRoot("sub") then
response.write "show-menu=" & oMenuRoot("id")
else
response.write oMenuRoot("link")
end if
response.write """,,"""",1" & vbcrlf
oMenuRoot.movenext
loop
set oMenuRoot = nothing
'SUB MENUS
do until oMenuSub.eof
if intOldTree<>oMenuSub("parent") then
blnNewTree=true
response.write "])" & vbcrlf
else
blnNewTree=false
end if
if blnNewTree then
response.write "addmenu(menu=[""" & oMenuSub("parent") & """," & vbcrlf & ",,120,1,"""",style1,,""left"",effect,,,,,,,,,,,," & vbcrlf
end if
response.write ",""" & oMenuSub("label") & ""","""
if oMenuSub("sub") then
response.write "show-menu=" & oMenuSub("id")
else
response.write oMenuSub("link")
end if
response.write """,,,1" & vbcrlf
intOldTree=oMenuSub("parent")
oMenuSub.movenext
loop
response.write "])" & vbcrlf
set oMenuSub = nothing
%>
dumpmenus()


</script>
<SCRIPT language=JavaScript src="mmenu.js" type=text/javascript></SCRIPT>


Poster: Ruth
Dated: Wednesday April 21 2004 - 17:34:35 BST

Steve,
You are using version 3 of the menu and will have to post in that section. That version is no longer supported, however people do post in the version 3 forum and often there are responses to help you. I'm sorry I don't know anything about database driven menus. Why not upgrade to version 5? I'm sure there are a lot of people who use database driven version 5.

Ruth


Poster: steveclements
Dated: Wednesday April 21 2004 - 17:38:41 BST

Ruth

I am using Version 5 of the menu but the only code available on the forum is for version 3. I was after some help (or code) for version 5.


Poster: Ruth
Dated: Wednesday April 21 2004 - 18:38:04 BST

Steve,
Not sure if this will help. http://www.milonic.com/forum/viewtopic.php?t=3228 It's about php/mysql and it is version 5

Ruth


Poster: Bischoff
Dated: Friday July 2 2004 - 12:00:46 BST

A little late, but maybe it will still help.... Our website is completely CMS based. Also the complete menu system is stored inside a database. The programming was done by http://www.incedo.de. It is a wonderfull system and absolutely flexibe. I am sure you can make a good deal with Incedo AG about some bits and bytes.

You can have a look at http://www.naturheilmagazin.de and see the menu system.

Kerstin