Property separator - custom property

Member since: 2004
 
Hi! Is there anyone who can show me how to implement a simple property separator (like the one in this 4.x sample http://www.episerver.com/en/EPiServer_Knowledge_Center/Download2/Code-Samples/2636/2638/) in CMS? Thank you very much :)
#15921 Dec 10, 2007 16:51
  •  
    Hi Tony! Use Add > New Item in Visual Studio to create a Custom Property. Notice that one main difference is that the rendering is moved to a separate class PropertyXXXControl. It could look something like this: [Serializable] [PageDefinitionTypePlugIn(DisplayName="Skillelinje", Description="Skillelinje for redigeringsmodus.")] public class PropertyDivider : EPiServer.Core.PropertyNumber { // TODO: Override members of EPiServer.Core.PropertyNumber to provide your own logic. public override EPiServer.Core.IPropertyControl CreatePropertyControl() { return new PropertyDividerControl(); } } ------------ public class PropertyDividerControl : EPiServer.Web.PropertyControls.PropertyDataControl { /* Override CreateXXXControls to control the appearance of the property data in different rendering conditions. public override void CreateDefaultControls() - Used when rendering the view mode. public override void CreateEditControls() - Used when rendering the property in edit mode. public override void CreateOnPageEditControls() - used when rendering the property for "On Page Edit". */ public override void CreateEditControls() { string divTag = " Sincerly, Fredrik Haglund, INEXOR AB http://blog.fredrikhaglund.se
    #16639 Dec 11, 2007 17:23
  • Member since: 2007
     

    Hi Fredrik and everyone else,

    We're interested in the same thing as Tony is asking for so if Fredrik, or someone else who has a similar solution, could share the code for a separator property we'd really appreciate it.

    Best regards

    Martin

    #27864 Feb 11, 2009 11:20
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
Please login to post a reply