![]() |
Enterprise Systems »
Content Management Server »
General
Intermediate
Microsoft Content Management Server Site Map controlBy Stephen HuenDisplay the CMS channel structure in a hierarchical tree that is expandable and collapsible. |
VB, Javascript.NET 1.1, .NET 2.0, Win2K, Win2003, ASP.NET, VS.NET2003, VS2005, Dev
|
|
Advanced Search |
|
|
|
||||||||||||||||

For use in Microsoft Content Management Server, this Site Map web control displays channel structure in a hierarchical tree that is expandable and collapsible when viewed in a IE4+ or NS6+ browsers. When viewed in NS4, the tree is fully expanded. The starting channel is configurable so you can have multiple instances of the control in one page, rendering different portions of a site if so desired.
A C# version of this control is available here.
The web control has several public properties:
StartChannelPath - Optional. Starting channel path. Default is "/channels/".
ImagePath - Optional. IIS path to the three icons. Default is "/<MCMS Site Application Name>/images/".
JavascriptPath - Mandatory. IIS path to the JavaScript file SiteMap.js. E.g.: "/<MCMS Site Application Name>/Includes/".
ExpandMap - Optional. Fully expand the channel and posting tree on first load. Valid values are True and False. Default is True.
SortChildrenBy - Optional. Display order of channels and postings in tree. Valid values are "Display Name", "Name", and "Ordinal". Default is no sorting.
ShowPostings - Optional. Display postings in tree. Valid values are True and False. Default is False.
DefaultPostingName - Optional. When ShowPostings is True and there is default posting for channel, specify default posting name to hide default postings from the tree. For example, "default".
ShowDescription - Optional. Show channel and posting description in hyperlink tooltips. Valid values are True and False. Default is True.
MaxLevels - Optional. Show the specified number of channel levels only. Default is "0" which shows all channel levels. <%@ Register TagPrefix="wc1"
Namespace="WebControlLibraryRootNamespace.QuestechSystems.WebControls"
Assembly="WebControl Library Assembly Name" %>
...
<head>
...
<link rel="stylesheet"
href="/<MCMS Site Application Name>/style/SiteMap.css" media="all">
...
</head>
...
<wc1:SiteMap id="SiteMap" runat="server" StartChannelPath=""
JavascriptPath="/<MCMS Site Application Name>/Includes/"
ExpandMap="" SortChildrenBy="Display Name"
ShowPostings="True" DefaultPostingName="default"
ShowDescription="" MaxLevels="0">
</wc1:SiteMap>
...
If your like the Expand All and Collapse All links as shown in the above picture, add links to the template like:
<a href="#" onclick="actionLayer(true);return false">Expand All</a>
<a href="#" onclick="actionLayer(false);return false">Collapse All</a>
Note the media="all" attribute in the stylesheet reference. It prevents NS4 from reading it, as SiteMap.css is not compatible with NS4. If you don't care for NS4, you can also copy the content of SiteMap.css and add it into your site stylesheet.
Please check if there are any conflicts between your site stylesheet and SiteMap.css. For example, the sample site WoodgroveNetVB messes up the rendering quite badly.
ImagePath.
JavascriptPath.
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 17 May 2006 Editor: Smitha Vijayan |
Copyright 2004 by Stephen Huen Everything else Copyright © CodeProject, 1999-2009 Web13 | Advertise on the Code Project |