5,696,038 members and growing! (10,615 online)
Email Password   helpLost your password?
Enterprise Systems » Content Management Server » General     Intermediate

Microsoft Content Management Server Site Map control

By Stephen Huen

Display the CMS channel structure in a hierarchical tree that is expandable and collapsible.
VB, Javascript.NET 1.1, .NET 2.0, Win2K, Win2003, Windows, .NET, ASP.NET, Visual Studio, VS.NET2003, VS2005, Dev

Posted: 15 Feb 2004
Updated: 17 May 2006
Views: 49,016
Bookmarked: 18 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
11 votes for this Article.
Popularity: 3.75 Rating: 3.60 out of 5
0 votes, 0.0%
1
1 vote, 9.1%
2
2 votes, 18.2%
3
3 votes, 27.3%
4
5 votes, 45.5%
5

Sample Image - sample.gif

Introduction

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.

Description

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.

Installation instructions

  1. Copy SiteMap.vb to the web control directory of your MCMS site.
  2. In your sitemap template, register the control, include SiteMap.css, and insert the control. For example:
    <%@ 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.

  3. Copy channel.gif, channelopen.gif, and channelclosed.gif into the image directory as specified in the property ImagePath.
  4. Copy SiteMap.js into the directory as specified in the property JavascriptPath.
  5. Rebuild the solution in VS.NET.

History

  • V1.0 - 2004.02.15 - Base.
  • V1.1 - 2005.02.12 - Added an option to limit the channel depth.
  • V1.2 - 2006.05.15 - Added an option to show the postings in the tree. Added an ASP.NET 2.0 version.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Stephen Huen



Occupation: Web Developer
Company: Questech Systems
Location: Canada Canada

Other popular Content Management Server articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 10 of 10 (Total in Forum: 10) (Refresh)FirstPrevNext
Generaldllmemberrinali1:23 19 May '08  
GeneralNeed Urgent HelpmemberMember 424222719:15 12 Mar '08  
Questionhi ....confused with steps given..memberTriplek23:30 18 Oct '07  
GeneralLocation of web controlsmemberr_samah0:07 23 Aug '07  
GeneralHow to add postings ?memberc borkowski10:50 25 May '05  
GeneralRe: How to add postings ?memberStephen Huen11:10 25 May '05  
GeneralRe: How to add postings ?memberc borkowski11:12 25 May '05  
GeneralI don't have file dll to run it.membernminhkha17:16 30 Jan '05  
GeneralPerformance Problemmemberalexcohen2:01 17 Feb '04  
GeneralRe: Performance ProblemsussAnonymous10:42 27 Sep '04  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 17 May 2006
Editor: Smitha Vijayan
Copyright 2004 by Stephen Huen
Everything else Copyright © CodeProject, 1999-2008
Web10 | Advertise on the Code Project