November Happy Hour will be moved to Thursday December 5th.

Name of plain text page property

Vote:
 

This is perhaps a very basic question but I can't seem to figure it out. What data type do you use when you need a plain textbox page property in code? I don't want any formatting, no p/div tags added between line breaks, just a multiline textbox.

#89772
Aug 25, 2014 21:18
Vote:
 

Just use a string property with uihint textarea.

http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/7/Content/Properties/Using-String-Properties/

http://world.episerver.com/Blogs/Alexander-Haneng/Dates/2012/7/How-to-define-properties-in-EPiServer-7---A-quick-reference/

For example

[Display(            
Name = "Heading",            
Description = "",            
GroupName = SystemTabNames.Content,            
Order = 10)]        
[UIHint(UIHint.Textarea)]
public virtual string Heading { get; set; }

Good luck!

#89773
Edited, Aug 25, 2014 21:25
Vote:
 

I assumed it was easy. :) Thank you, Henrik!

#89815
Aug 26, 2014 20:42
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.