Microsoft Content Management Server Thumbnail Images Placeholder (C#)






4.44/5 (8 votes)
May 11, 2004
2 min read

89947

1191
An XML placeholder control that displays thumbnails of images in a Resource Gallery.
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
- 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.
- Copy all the files in the directory WebControlLibray to the web control library project of your MCMS solution.
- 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>
- 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
andAuthoringReeditSaveAndExitAction
. - Include ThumbnailImages.css in the template.
- Make sure subscribers have access to the specified Resource Gallery.
- 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.
- Fixed the
- 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.