Automating room allocated for top-level menu

Another automatic cascading menu for Actinic 5 onwards. This one allows more modern DHTML effects.
Post Reply
Site Admin
Posts: 1238
Joined: Sat Feb 07, 2004 9:55 pm

Automating room allocated for top-level menu

Post by norman » Tue Jan 10, 2006 6:01 pm

The menu isn't part of the page (it floats above it) so it isn't easy to allow space for more entries as the Section structure changes.

There are 2 kludges you can do to help reserve room.

Make an image spacer.gif that you put in the menu area. It need only be a 1x1 transparent image.

Then either:

1) Make a Custom Property MENUHEIGHT containing the height of the required area. Change your spacer.gif code in Act_Primary.html to be something like

Code: Select all

<img src="spacer.gif" width="1" height="CUSTOMVAR:MENUHEIGHT">
Now you can manage that size without template tinkering by changing MENUHEIGHT in Design / Options / Site Defaults.

2) The JavaScript structure section_tree_names is loaded by NorCascade it has a length property equal to the number of top-level sections. So you could use JavaScript in Act_Primary.html to create your spacer with a computed height.

Code: Select all

<script language=JavaScript>
document.write('<img src="spacer.gif" width="1" height="' + (section_tree_names.length * 25) + '">');
Change the 25 above to suit the height of each table cell.

Post Reply