Click here to Skip to main content
15,353,676 members
Articles / Web Development / HTML
Posted 12 Dec 2004


31 bookmarked

MCMS Placeholder Content Web Part

Rate me:
Please Sign up or sign in to vote.
4.36/5 (5 votes)
22 Jan 2005CPOL4 min read
Display content from a Content Management Server placeholder in a WSS site.


This web part displays content from a Content Management Server (MCMS) page placeholder in a Windows SharePoint Services (WSS) site or a SharePoint Portal Server (SPS) site. No actual placeholder content is stored in the web part. If the placeholder is updated with new content in the MCMS site, the web part will automatically show the new content in the WSS site.


There are several ways to pull content from MCMS in a WSS site. Off the shelf so to speak, Microsoft provides the free MCMS Connector for SharePoint Technologies. It comes with a MCMS Page Listing web part that displays a summary list of pages in a particular channel. If your requirements are anything more complicated than that, you will need to write your own custom code.

The simplest approach is to use the Page Viewer web part. It displays any web page content in an IFrame. With the entire web page loaded with its own navigation and everything, it does not provide users an UI experience that the content is part of your WSS site.

If the MCMS site is located in the same box as your WSS site, code your heart out with MCMS API in your web part. As this is the exception rather than the norm in a production environment, you may need to resort to Web Service or custom IFrame development to display just the placeholder content, not the entire MCMS page.

MCMS Web Service is indeed a very good approach though you may run into some authentication issues with a web part calling the web service. Windows Integrated Authentication will not work for the web service as far as I know. If you have a SPS site, I would use SPS' Single Sign-On (SSO) service to authenticate.

Using the IFrame route, this web part calls a custom MCMS page which renders the content of a specific placeholder of your choice into an IFrame. The IFrame automatically adjusts its height based on the length of the content so that no scroll bars will show.


  1. Web Part

    On the WSS server, run SharePoint Services administration tool Stsadm.exe to install package Alternatively, you can rebuild the package using the source files included. To install the package, run the following command:

    Stsadm.exe -o addwppack -filename c:\

    Modify web.config to mark the web part as safe:

        <SafeControl Assembly= "QuestechSystems.MCMSWebParts, 
            Version=, Culture=neutral, 
            Namespace="QuestechSystems.MCMSWebParts" TypeName="*" />

    The "MCMS Placeholder Content" web part should now appear in the Virtual Server Web Part Gallery.

  2. MCMS WssIntegration

    On the MCMS server, copy directory WssIntegration to the root of your MCMS site. Open Visual Studio. Include directory in your MCMS project. Rebuild project.


Image 1

The "MCMS Placeholder Content" comes with its own custom tool pane with the following properties:

  1. MCMS Site URL - URL to your MCMS site. For example http://woodgrovenet, http://server/woodgrovenet. The server can be a remote server obviously.
  2. Page - This is the posting display path. It will be automatically populated after you select a placeholder using the Select Placeholder dialog.
  3. Placeholder - This is the name of the placeholder. It will be automatically populated after you select a Placeholder using the Select Placeholder dialog.
  4. Select Page & Placeholder - Clicking this button will open a Select Placeholder dialog. This dialog allows you to select a Posting and the Placeholder in it that you want to render the content.

Image 2

You may also want to change the web part title in the Appearance section to fit the placeholder you selected.


  1. The web part stores the posting path, posting GUID and placeholder name. It uses the posting GUID and placeholder name to retrieve the placeholder content. If the posting is moved to another channel, the web part will still be able to locate the moved posting and renders the placeholder content. However, the posting path displayed in the custom toolpane will not be correct.
  2. The web part renders the raw content of a placeholder. Placeholders like XmlPlaceholder will not be rendered properly.
  3. The web part will render the unpublished view of the placeholder when you are editing or designing a WSS page.
  4. If you only have one MCMS site to pull content from, you can modify GetSiteUrlDefaultValue() in RenderMCMSPlaceholderTool.cs to always display the specific MCMS Site URL.
  5. All hyperlinks in the rendered placeholder content will open up in the main page, not inside the IFrame.
  6. Scroll bars in the IFrame may appear in non-IE Windows browsers. I only tested it in Windows IE.
  7. If the placeholder content uses custom CSS styles, it will not be rendered in the web part like it does in the MCMS site. In the web.config file of your MCMS site, add the appSettings key SiteCssHrefForWss with the HREF of your site stylesheet. For example, if the MCMS site is the WoodgroveNet site:
    <add key="QuestechSystems.SiteCssHrefForWss" 
                value="/WoodgroveNet/Style/styles.css" />


  • V1.0 - 2004.12.11 - Base.
  • V1.1 - 2005.01.15 - Resolved cross-site security problems when CMS and WSS sites are on different servers.
  • V1.2 - 2005.01.22 - Added option to insert stylesheet reference when rendering placeholder content (see remark 7 above).


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Stephen Huen
Software Developer (Senior)
Canada Canada
A Microsoft Certified Professional Developer and Technology Specialist.

Experience and expertise in SharePoint 2016 / 2013 / 2010 / 2007.

Role ranges from a developer in a multi-person team to a solution consultant with expert-level skills, leading a project to completion status.

Proven experience working effectively in a team environment and a self-managed environment.

Comments and Discussions

QuestionI can't find the project? Pin
sarama30-Mar-08 18:36
Membersarama30-Mar-08 18:36 
GeneralHelp Needed | SharePoint Web part and MCMS Pin
Davendra19-May-06 2:47
MemberDavendra19-May-06 2:47 
GeneralRe: Help Needed | SharePoint Web part and MCMS Pin
Stephen Huen19-May-06 7:58
MemberStephen Huen19-May-06 7:58 
GeneralRe: Help Needed | SharePoint Web part and MCMS Pin
Davendra21-May-06 19:38
MemberDavendra21-May-06 19:38 
QuestionCan this use Forms authentication? Pin
diver726-Jan-06 9:07
Memberdiver726-Jan-06 9:07 
GeneralMCMS 2002 and VStudio 2003 does not work Pin
edsanfor237-Jul-05 15:23
Memberedsanfor237-Jul-05 15:23 
GeneralRe: MCMS 2002 and VStudio 2003 does not work Pin
Stephen Huen7-Jul-05 15:55
MemberStephen Huen7-Jul-05 15:55 
GeneralRe: MCMS 2002 and VStudio 2003 does not work Pin
edsanfor237-Jul-05 16:37
Memberedsanfor237-Jul-05 16:37 
GeneralRe: MCMS 2002 and VStudio 2003 does not work Pin
Stephen Huen7-Jul-05 17:18
MemberStephen Huen7-Jul-05 17:18 
GeneralHaving problems Pin
milesowen12-Jan-05 15:24
Membermilesowen12-Jan-05 15:24 
GeneralRe: Having problems Pin
Stephen Huen12-Jan-05 16:13
MemberStephen Huen12-Jan-05 16:13 
GeneralRe: Having problems Pin
milesowen13-Jan-05 3:06
Membermilesowen13-Jan-05 3:06 
GeneralRe: Having problems Pin
Stephen Huen13-Jan-05 19:36
MemberStephen Huen13-Jan-05 19:36 
GeneralRe: Having problems Pin
Stephen Huen13-Jan-05 19:38
MemberStephen Huen13-Jan-05 19:38 
GeneralRe: Having problems Pin
milesowen14-Jan-05 1:29
Membermilesowen14-Jan-05 1:29 
GeneralRe: Having problems Pin
Stephen Huen15-Jan-05 15:14
MemberStephen Huen15-Jan-05 15:14 
GeneralRe: Having problems Pin
milesowen17-Jan-05 5:25
Membermilesowen17-Jan-05 5:25 
GeneralRe: Having problems Pin
milesowen17-Jan-05 10:53
Membermilesowen17-Jan-05 10:53 
GeneralRe: Having problems Pin
Stephen Huen17-Jan-05 15:47
MemberStephen Huen17-Jan-05 15:47 
GeneralRe: Having problems Pin
Stephen Huen22-Jan-05 12:17
MemberStephen Huen22-Jan-05 12:17 
Generalthis is good Pin
jkoos2-Jan-05 13:00
Memberjkoos2-Jan-05 13:00 
Generalgreat - thanks Pin
meron18-Dec-04 21:47
Membermeron18-Dec-04 21:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.