Click here to Skip to main content
Click here to Skip to main content

Microsoft Content Management Server Thumbnail Images Placeholder (C#)

, 17 May 2006
Rate this:
Please Sign up or sign in to vote.
An XML placeholder control that displays thumbnails of images in a Resource Gallery.

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

Share

About the Author

Stephen Huen
Software Developer (Senior)
Canada Canada
A Microsoft Certified Professional Developer and Technology Specialist.
 
Experience and expertise in SharePoint 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.
Follow on   LinkedIn

Comments and Discussions

 
Questiontemp url but not fixed url, any ideas? Pinmembermichael zhao16-Mar-07 10:57 
Answer[Message Removed] Pinmemberimmetoz1-Oct-08 9:45 
Generalthumbnail quality Pinmemberjonathan hall14-Mar-07 12:41 
GeneralRe: thumbnail quality PinmemberStephen Huen15-Mar-07 7:27 
Yeah, this is a mcms thing.
GeneralASP .NET 2.0 Compatibility Pinmemberstathopi12-May-06 6:02 
GeneralRe: ASP .NET 2.0 Compatibility PinmemberStephen Huen12-May-06 12:27 
Generalplease help Pinmembermoshesp7-Feb-05 5:52 
GeneralRe: please help PinmemberStephen Huen7-Feb-05 7:18 
GeneralRe: please help Pinmembermoshesp7-Feb-05 23:29 
GeneralRe: please help PinmemberStephen Huen8-Feb-05 5:16 
GeneralRe: please help Pinmembermoshesp8-Feb-05 22:45 

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

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

| Advertise | Privacy | Mobile
Web02 | 2.8.140821.2 | Last Updated 17 May 2006
Article Copyright 2004 by Stephen Huen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid