simpleNavigation tag generates an HTML unordered list. You can define
which wesite tree node you want to start from.
<div id="verMenu">
<cmsu:simpleNavigation startLevel="1" expandAll="show"/>
</div>
Using CSS rules, you can render the list as a horizontal or vertical
cascading menu. There's no javascript needed unless you want it to work
for IE, in which case a javascript needs to parse the documents list
items onLoad and change their class, and declare mouseover events to
trigger the menu behaviors.
Since a Hz menu runs out of rowspace after 10 links or so, a javascript
can get the links innerHtml length and make adjustments to the width to
make more room. You can leave the width out, and the links will render
with just the space they need, but without the width they won't render
correctly in Opera.
If you want borders around the menus, you may run into problems with IE
do to its different impementation of the box model. Some coders are
using browser hacks to trick IE into using alternate list width rules to
fix the box border, but with IE 7, those will no longer work. Since M$
is already using 'Conditional Comments', you can employ those instead to
provide alternate rules for IE.
While pointers to level 3 menus are easy enough, I wondered if the menus
could be further dressed up with a background sidebar and icons (like M$
Office). Its possible, but requires a javascript to set particular list
items to classes that contain rules for the icons. Also the javascript
that fixes the list item behaviors for IE needs to have additional code
blocks to accommodate these icons. All this item specific code kind of
defeates the purpose of having a dynamically generated navigation, but I
had hoped a better solution would come to me as I went through it. It
hasn't, but then I haven't been asked to provide a menu detailed like
this either. I suspect some of this item specific code could be added to
a page's property data and populated to the javascript functions if I
put some effort into it. So the menu would still be competly dynamic.
Right now, I'm satisfied that the sidebar and icons can be done if
necessary.
Here's a test menu.
http://www.ahouse4you.org/css_menu/
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 19, 2006 2:32 AM
To: [email protected]
Subject: [magnolia-user] DHTML Menu
Hi everybody,
I would like to feed a dhtml drop menu with my website treenodes and I
would like to know whether somebody could let me know where to start.
What objects should I use? Is there another way than using the
CurrentActivePage as a start point?
Many thanks for your help.
Stephane Gauthier
************************************************************************
************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed.
If you have received this email in error, please notify the system
manager ([EMAIL PROTECTED]) and delete the message with any
attached files from your system.
The confidentiality and integrity of this message cannot be guaranteed
on the Internet and the sender does not accept liability for its
content.
************************************************************************
***********
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------