November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi
I think you need to specify backing type for the legacy UI, as it doesn't undestand the UI hint setting.
In this case you would add [BackingType(typeof(PropertyLongString))] to your model.
Regards
Per Gunsarfs
I looked into this and PropertyLongString is the default backing type for strings to be able to store strings of any length. With this change came that PropertyLongString creates a "normal" string editor by default. If you want to edit your typed model long strings in legacy mode there is a simple work around. Create a custom property that inherits from PropertyLongString and always return an instance of PropertyLongStringControl:
[ContentType(GUID = "F8D47655-7B50-4319-8646-3369BA9AF05E")]
public class MyPage : SitePageData
{
[UIHint(UIHint.Textarea)]
[BackingType(typeof(LegacyLongString))]
public virtual string LongString { get; set; }
}
[PropertyDefinitionTypePlugIn]
public class LegacyLongString : PropertyLongString
{
public override IPropertyControl CreatePropertyControl()
{
return new PropertyLongStringControl();
}
}
Hi Linus,
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.
The new
[UIHint(UIHint.Textarea)]
is working fine in the new UI.
But if (for some reason) the editor wants to edit that property in the old UI? Well the textarea is gone, there is only a textbox input now.
How to fix this?