Glossary Item Box

Site templates: Site templates

Menu: MenuContext MenuCms Site Map Data SourceSite mapPath Menu

General: CMS architecture

See Also CmsDeveloperGuide Send comments on this topic.

Main Menu

The control forms the main (first level) menu of the site.  

You can form menu using JavaScript or HTML code. It is possible to select current menu item (the one where user is at this moment). Also function receives the attribute whether the user is on a main page of the site.

 

Client-side API for menu creation by script (if CreateMenuUsingScript = true):

Function or variable Description
CMS_MainMenu_ItemCount The variable contains number of items count
CMS_MainMenu_GetBegin() Function for begin menu forming
CMS_MainMenu_GetEnd() Function for end menu forming
CMS_MainMenu_GetItem(menuItemGuid, name, url, desc, target, 
      iconURL, iconWidth, iconHeight, isCurrMenuItem, isFirstPage)
Function for menu item forming
 

Example for script generated menu:

<%@ Register TagPrefix="cmsmenu" Namespace="CMSLib.Menu" Assembly="CMSLib" %>

<cmsmenu:mainmenu runat="server" CreateMenuUsingScript="True" PathToMenuScript="~/CMS_MainMenu.js" >
</cmsmenu:mainmenu>

 
Example for HTML menu:

<%@ Register TagPrefix="cmsmenu" Namespace="CMSLib.Menu" Assembly="CMSLib" %>

<cmsmenu:mainmenu runat="server" CreateMenuUsingScript="False"
    BeginHTML="-= " BeforeItemHTML="[ " EndHTML="=-" EndItemHTML=" ] "
    HomePageName="Main page">
</cmsmenu:mainmenu>

 
You can change default 'CMS_MainMenu' prefix for the JS functions. Use JSFunctionsPrefix property to set new prefix.
 

Site templates: Site templates

Menu: MenuContext MenuCms Site Map Data SourceSite mapPath Menu

General: CMS architecture

 

 


© 2005-2007 Astron Digital Ltd. All Rights Reserved.