![]() |
Enterprise Systems »
Content Management Server »
General
Intermediate
License: The Code Project Open License (CPOL)
Microsoft Content Management Server Custom Properties PlaceholderBy Stephen HuenA placeholder control that allows authors to edit Posting Custom Properties directly in a page. |
C#, VB.NET 1.1, Win2K, Win2003, ASP.NET, Visual Studio, Dev
|
|
Advanced Search |
|
|
|
||||||||||||||||

For use in Microsoft Content Management Server, this is a placeholder control that allows authors to edit Posting Custom Properties directly in the page. In authoring mode, Custom Properties are rendered in textboxes or listboxes for users to enter values. In unpublished non-preview mode, Custom Properties are rendered in text values. In published or preview mode, nothing will be rendered.
Both C# and VB.NET versions are included.
Although this is built as a placeholder control, nothing is actually saved to the placeholder. I started out developing this as a plain web control but could not find a suitable event to save the Custom Properties. You see, there is no CmsPosting_Saved event. The best compromise is CmsPosting_Changed event and check for PlaceholderPropertyChange action. But if there are five placeholders in a page, my routine will be run five times! More problematic is that this action does not take into account the situation when a page does not have any placeholders, like summary page for a channel cover. That's why I built it as a placeholder control.
This control will not render Custom Property of the selection type if it contains one allowed value only. This type of Custom Property setting is usually used for template logic and does not serve any authoring purpose since you cannot change the value.
The styling of the Custom Properties table rendered is not meant for customization. To set it apart from regular page content, the table uses the built-in CMS look and feel. The table title is customizable however, and is exposed through a public property TableTitle. The default value is "Custom Properties". Since all the table fields come with CSS classes, you can still use an external stylesheet to customize the look and feel of the table.
Please reference section "Custom Placeholder Controls" in CMS documentation. It is located in Site Development: Developing Your MCMS Site: Extending the Functionality of MCMS: Creating Custom Placeholders: Custom Placeholder Controls.
| You must Sign In to use this message board. | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 15 Feb 2005 Editor: Smitha Vijayan |
Copyright 2004 by Stephen Huen Everything else Copyright © CodeProject, 1999-2009 Web09 | Advertise on the Code Project |