Glossary Item Box

Menu: MenuMain MenuContext MenuPath MenuSite map

General: OverviewCMS architecture

See Also CmsDeveloperGuide Send comments on this topic.

Cms Site Map Data Source

Site map data source for CMS site allows you to create a site in an ordinary for ASP.NET-2 way and also use ASP.NET-2 built-in controls (SiteMapPath, Menu, TreeView) that allow to display a site menu.

As a provider it is used CMSLib.Menu.CmsSiteMapProvider.

 

Example of using CmsSiteMapDataSource with a standard ASP.NET Menu control:

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


<cmsmenu:CmsSiteMapDataSource ID="CmsSiteMapDataSource1" runat="server" ShowStartingNode="False" />
<asp:Menu ID="Menu1" runat="server" DataSourceID="CmsSiteMapDataSource1" />

 

 If you don’t want your menu to show a root item, set ShowStartingNode="False"

 

Showing Predefined menu level

With the help of RootMenuItemGuid property you can set up CmsSiteMapProvider so that it will return only menu items of a certain level. Thereby you can organize a city list output, where each city is a link on a corresponding menu item. The same feature exists in ContextMenu.
 
Example of using CmsSiteMapProvider in a given mode:
 

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

<cmsmenu:CmsSiteMapDataSource ID="CmsSiteMapDataSource1" runat="server" ViewStateEnabled="false"
    RootMenuItemGuid="6e95962f-5277-451d-84ad-4b7249b33d33" ShowStartingNode="false"
    onChange="location.href=this.value; return false"
 />
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="CmsSiteMapDataSource1" DataTextField="Title" DataValueField="Url" />

 

Menu: MenuMain MenuContext MenuPath MenuSite map

General: OverviewCMS architecture

 

 


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