[minor bug?] Dynamic content: PropertyLongString property shows input text instead of textarea


The title says it all. The code:

    public class BlockQuote : DynamicContentBase
        #region Properties
        public string Text
            get { return (string)base.Properties["Text"].Value; }
            set { base.Properties["Text"].Value = value; }

        public BlockQuote()
            this.Properties = new PropertyDataCollection
                    {"Text", new PropertyLongString()}

When editting the Text property of the dynamic content an input of type text (thus one line) is shown. A textarea is expected.

#64422 Dec 20, 2012 11:58
  • Linus Ekström
    Member since: 2002

    This is a side effect of moving the default string backing type to PropertyLongString for the new typed models that affects the old editing system that is still used for dynamic content. I have written about the work around here:


    #64459 Edited, Dec 20, 2012 16:21
  • Joshua Folkerts
    Member since: 2008
        public class LegacyLongString : PropertyLongString
            public override IPropertyControl CreatePropertyControl()
                return new PropertyLongStringControl();

        This should do it for you per Linus's post

    #64462 Edited, Dec 20, 2012 18:24

    Thank you, works perfectly.

    #64512 Dec 24, 2012 16:34
  • Komal Goyani
    Member since: 2014

    CreatePropertyControl() doesn't work in EpiServer7.5. 

    I had created one custom property in EpiServer6R2 to display horizontal ine in Edit mode (for sepration of header and footer properties) but this property doesn't work in 7.5. it doesn't call CreatePropertyControl() while debugging. Do you have any ideas why it is not calling?

    Thanks in advance.

    #111632 Oct 16, 2014 18:27
  • Henrik Fransas
    Member since: 2007

    Komal. That does not work in 7.5, custom properties are completely rewritten.

    Take a lock at Linus blog or Teds blog and you will find examples on how to do

    #111641 Oct 17, 2014 6:28