Redakt content models are created as .NET POCO classes in your application codebase. You can change the configuration and behavior of these models by using attributes. This article describes the attributes you can place on your content models on the property level. If you're trying to change the configuration or behavior of your model as a whole, check out the class attributes article.
Some attributes can be used both on classes and properties, and therefore also appear in the class attributes list.
Attribute list
The following attributes (in alphabetical order) can be applied to content model class properties. All attributes are part of the Redakt.ContentManagement.Annotations
namespace.
AcceptMediaType
attribute sets the media (MIME) types that are accepted for file uploads for this property.AllowContentType
attribute sets the content models that are allowed as nested content of this property.CultureDependent
attribute specifies that this property is culture-specific and has separate values per culture.DefaultValue
attribute sets a default value for the property if it is undefined.DisplayName
attribute sets the display name for the property in the back-office user interface.DisplayOnList
attribute specifies that this property will be displayed in list overviews.DisplayOrder
attribute sets the display order of the property in the back-office user interface.EditableFor
attribute sets the user groups that are allowed to edit this property in the back office.Embedded
attribute specifies that this property will be embedded into its master content.EnableLinkToCulture
attribute specifies that the value of this property can be linked to another culture in the back office.EnableLinkToNeutralCulture
attribute specifies that the value of this property can be linked to the neutral culture of the currently selected culture in the back office.HelpText
attribute sets the tooltip help text that is displayed alongside the property label.HideLabel
attribute specifies that the label should be hidden for this property.IgnoreMember
attribute specifies that this property should be ignored by the Redakt system.Inline
attribute specifies that this property will be displayed in line with other properties in the back office.Key
attribute sets the unique key that is used for identifying the property in the data store.PrimaryMedia
attribute specifies that this property is the primary media for the model.ReadOnly
attribute specifies that this is a read-only property.SearchIndex
attribute specifies that this property should be indexed in the full-text index.Section
attribute sets the section in the back office user interface that this property will appear in.TitleFormat
attribute sets the title format for content of this type when rendered in the Redakt back office.Tooltip
attribute sets the popup tooltip that will be displayed alongside the property label in the Redakt back office.
For other property attributes that configure the behavior and validation of property editors in the back office, see the property editors page.