JavaScript Menu, DHTML Menu Powered By Milonic
Demo for mm_siteIndex
for use with Milonic Solutions' DHTML Menu V5
This sample demo was created in reference to a number of questions and requests on how to generate a 'sitemap' from the menu.

The function.

The function  generates a collection of unordered lists from a link in a menu item. It opens the links in a new window. Since the index is generated at runtime from the menu data, it should always accurately reflect your current menu navigation. The links in the index window control navigation in the parent window.

Things of Note

The parameters.

mm_siteIndex() is the function name. It takes three [3] parameters.

Instructions

  1. Download the mm_siteIndex.js file.

  2. Edit your menu_data.js file and create the aI string where you want the link to generate the site index.
    aI("text=YourText;url=javascript:mm_siteIndex('windowAttributes',
    'Heading to appear on the page','cssFile [this is optional');");
  3. Place the call for the file wherever you want, you could even put it in an include file
    <SCRIPT language=Javascript src="mm_siteIndex.js" type=text/javascript></SCRIPT>
    

Modifying The Parameters

  1. The aI string which generates the page in this sample is:
    aI("text=Site index;url=javascript:mm_siteIndex('top=0,left=0,height=500,width=400',
     'Milonic Site Index','siteindex.css');");

  2. You can modify the parameters for the windowAttributes, indexHeading and the optional cssFile
    aI("text=itemText;url=javascript:mm_siteIndex('windowAttributes',
    'indexHeading','cssFile [this is optional');");

    where itemText is the text that you want to appear in the menu item, 'windowAttributes' are the placement, dimensions, attributes such as toolbar that you want for the window that will open, indexHeading is the Heading [text] that will appear at the top of the window, and cssFile is the file you have created for the css style of the page being opened. This is an optional attribute and does not need to be included if you don't want to apply css styles to the page. If you do not include css the aI string would be as follows

    aI("text=itemText;url=javascript:mm_siteIndex('windowAttributes','indexHeading');");

Find out more about window attributes and what can be use here.

DHTML Menu courtesy of Milonic Solutions
Download this sample or you can download the mm_siteIndex.js file