Try our conversational search powered by Generative AI!

[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.

Dec 20, 2012 11:58

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:

Edited, Dec 20, 2012 16:21
    public class LegacyLongString : PropertyLongString
        public override IPropertyControl CreatePropertyControl()
            return new PropertyLongStringControl();

    This should do it for you per Linus's post

Edited, Dec 20, 2012 18:24

Thank you, works perfectly.

Dec 24, 2012 16:34

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.

Oct 16, 2014 18:27

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

Oct 17, 2014 6:28
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.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.