5,695,118 members and growing! (13,238 online)
Email Password   helpLost your password?
Enterprise Systems » Content Management Server » General     Intermediate

Microsoft Content Management Server Thumbnail Images Placeholder (C#)

By Stephen Huen

An XML placeholder control that displays thumbnails of images in a Resource Gallery.
C#.NET 1.1, .NET 2.0, Win2K, Win2003, Windows, .NET, ASP.NET, Visual Studio, VS.NET2003, VS2005, Dev

Posted: 10 May 2004
Updated: 17 May 2006
Views: 49,840
Bookmarked: 23 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
7 votes for this Article.
Popularity: 3.70 Rating: 4.38 out of 5
0 votes, 0.0%
1
1 vote, 14.3%
2
0 votes, 0.0%
3
2 votes, 28.6%
4
4 votes, 57.1%
5

Sample Image - screenshot.gif

Summary

For use in the Microsoft Content Management Server, this is an XML placeholder control that displays thumbnails of images in a Resource Gallery. In authoring mode, the authors specify which Resource Gallery to generate image thumbnails, the thumbnail size, and other sorting and display properties. In presentation mode, all images in the specified Resource Gallery will be rendered as thumbnails with links to the full size images. Practical applications include showing the images of an event, for example.

A VB.NET version of this control is available here.

Description

The placeholder control has the following public properties:

  • SelectGalleryDefaultValue
  • ThumbnailSizeDefaultValue
  • NumColumnsDefaultValue
  • SortByDefaultValue
  • SortOrderDefaultValue
  • RepeatDirectionDefaultValue
  • ShowImageSizeDefaultValue
  • ImageExtensions

All these properties are optional. They allow designers to change the authoring label text and the default values.

The look and feel of the rendered output can be customized by CSS styles. Do a view source on the rendered page to see all the CSS classes available.

Installation Procedures

  1. Please reference the section "Custom Placeholder Controls" in the CMS documentation. It is located in: Site Development: Developing Your MCMS Site: Extending the Functionality of MCMS: Creating Custom Placeholders: Custom Placeholder Controls.
  2. Copy all the files in the directory WebControlLibray to the web control library project of your MCMS solution.
  3. Include the placeholder control in your page template. For example:
    <%@ Register TagPrefix="wcl"
    Namespace="QuestechSystems.WebControls"
    Assembly=""Web Control Library Assembly Name" %>
    ...
    ... 
    <wcl:ThumbnailImagesPlaceholder id="ThumbnailImagesPlaceholder1"
    runat="server" PlaceholderToBind="ThumbnailImages" 
    NumColumnsDefaultValue="3"
    ThumbnailSizeDefaultValue="64" SortByDefaultValue="Display Name"
    SortOrderDefaultValue="Ascending" RepeatDirectionDefaultValue="Horizontal"
    ImageExtensions="gif,jpg,png" ShowImageSizeDefaultValue="Yes">
    </wcl:ThumbnailImagesPlaceholder>
  4. In authoring mode, the client side validation is done by a validation control. In order for it to work, you need to modify some console actions. Copy the action classes to your web control directory. In the console file, register the custom actions and change the default actions to the new custom actions. For example:

    To register a custom action, add:

    <%@ Register TagPrefix="CustomAction"
      Namespace="QuestechSystems.WebControls.ConsoleControls" 
      Assembly=""Web Control Library Assembly Name" %>

    Change:

    <CmsConsole:AuthoringSaveNewAction id="AuthoringSaveNewAction1"
      runat="server">
    ...
    </CmsConsole:AuthoringSaveNewAction>

    to:

    <CustomAction:ValidatedSaveNewAction id="AuthoringSaveNewAction1"
      runat="server">
    ...
    </CustomAction:ValidatedSaveNewAction>

    and, similarly for AuthoringReeditSaveAction and AuthoringReeditSaveAndExitAction.

  5. Include ThumbnailImages.css in the template.
  6. Make sure subscribers have access to the specified Resource Gallery.
  7. Rebuild your site in VS.NET.

History

  • V1.0 - 2004.05.08 - Base.
  • V1.1 - 2004.07.08
    • Fixed the NullReferenceException when the control is added to an existing template and an existing page using the template is edited.
    • Split CustomAction.cs into individual class files.
  • V1.3 - 2005.04.14 - Revised the public properties and the CSS styles. Added option for Sort Order, Repeat Direction, and Show Image Size. Some changes based on the code submitted by James Penneck. Thanks!
  • V1.4 - 2006.05.14 - Added the 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 11 of 11 (Total in Forum: 11) (Refresh)FirstPrevNext
Generaltemp url but not fixed url, any ideas?membermichael zhao11:57 16 Mar '07  
General[Message Removed]memberimmetoz10:45 1 Oct '08  
Generalthumbnail qualitymemberjonathan hall13:41 14 Mar '07  
GeneralRe: thumbnail qualitymemberStephen Huen8:27 15 Mar '07  
GeneralASP .NET 2.0 Compatibilitymemberstathopi7:02 12 May '06  
GeneralRe: ASP .NET 2.0 CompatibilitymemberStephen Huen13:27 12 May '06  
Generalplease helpmembermoshesp6:52 7 Feb '05  
GeneralRe: please helpmemberStephen Huen8:18 7 Feb '05  
GeneralRe: please helpmembermoshesp0:29 8 Feb '05  
GeneralRe: please helpmemberStephen Huen6:16 8 Feb '05  
GeneralRe: please helpmembermoshesp23:45 8 Feb '05  

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
Web09 | Advertise on the Code Project