Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

MCMS SharePoint List Items Placeholder

0.00/5 (No votes)
22 Sep 2005 1  
Lists items in a Windows SharePoint Services (WSS) list.

Sample Image - sample1.gif

Introduction

For use in Microsoft Content Management Server (MCMS), this custom placeholder control (WssListItemsPlaceholder) lists items in a Windows SharePoint Services (WSS) list. The list can almost be any WSS list, like Document library, Image library, Announcement, Events, Contacts etc.

Installation

  1. Install the Web Service WSSWebs.asmx to your SPS/WSS site. In your SPS/WSS server, copy WSSWebs.asmx, WSSWebsdisco.aspx and WSSWebswsdl.aspx in SharePointWS to directory C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\ISAPI. Copy QuestechSystems.SharePointWS.dll to the BIN directory within.
  2. Copy directory WssIntegration to the root of your MCMS site.
  3. Copy files in directory Classes to the class directory of your MCMS site.
  4. Copy files in directory WebControls to the Web Controls directory of your MCMS site.
  5. In VS.NET, add the following Web References:
    1. Lists: http://<sharepoint-server>/_vti_bin/Lists.asmx
    2. Webs: http://<sharepoint-server>/_vti_bin/WSSWebs.asmx

    You need to do this in your development environment only. The URL property of the web references will be dynamically set at run time. Therefore you can just follow your regular deployment method to production.

  6. Edit file Classes/WssUtilities.cs. Change namespaces in lines 12 and 13 from ProjectName to your project name.
  7. In the MCMS template where you will place this placeholder control, insert the following stylesheet reference:
    <link rel="stylesheet" href="/<MCMS Site Application Name>/
                WssIntegration/Styles/WssListItems.css">
  8. In your project web.config, add the following appSettings key:
    <add key="QuestechSystems.WssListsToExclude" value="108,300" />
  9. Rebuild project in VS.NET.

Please also refer section "Custom Placeholder Controls", in MCMS documentation. It is located in Site Development: Developing Your MCMS Site: Extending the Functionality of MCMS: Creating Custom Placeholders: Custom Placeholder Controls.

Usage

In authoring mode, the placeholder control displays the name and location of the selected SharePoint/WSS list. To select a SharePoint list, click Select to launch the Select SharePoint List dialog.

First enter the Site URL. This is the top level WSS Site Collection URL and can be located at a remote server. For SharePoint Portal Server, you may need to enter the full top level Site Collection URL like http://<sps-server>/sites/sitename. Click Get Child Sites to display the child sites under this Site Collection. Select a Child Site and then a List. A preview of items will then be shown. Click OK to close the dialog.

There are two properties in the placeholder control: SiteCollectionUrl and SiteUrl. They correspond to the (form) values of Site URL and Child Site in the List Selector dialog. Both are optional and if specified restrict what the author can select in the dialog.

You can further restrict the type of list available for selection by entering the type code in the web.config appSettings key QuestechSystems.WssListsToExclude. The full list of type codes is defined in ServerTemplateType in WssUtilities.cs. By default, list types of Discussion and PortalSitesList are not supported. Since I have not tested with every type of WSS list, I am pretty sure there are some more that are not supported.

Lastly, layout of list items in presentation mode can be customized in WssListItems.css or using your own stylesheet.

Note

To author this placeholder, the IIS impersonation account or Application Pool "domain" user for the MCMS site needs to be at least a Reader in the SPS/WSS site.

History

  • V1.0 - 2005.04.10 - Base.
  • V1.1 - 2005.05.07 - In Select SharePoint List dialog, items list in Preview now opens up in new window.
  • V1.2 - 2005.09.06 - Remove authoring limitation that the MCMS Application Pool user needs to be the Site Collection Administrator or in the case of SPS, member of the SharePoint administrative group account.

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