Redakt.Annotations Namespace

Redakt.Annotations Namespace

Contains attributes for decorating page and content view models.

Classes

Name Description
AllowAtRootAttribute Specifies that this view model can be used for the root page in a site or a root item in a library.
AllowChildrenAttribute Specifies the view model types that children of this view model are allowed to have in the page or library hierarchy.
AllowContentAttribute Indicates which content view models are allowed to be added to this property.
AllowLayoutAttribute Specifies a layout that can be selected for this page view model.
CheckboxAttribute Uses a checkbox editor for this property in the Redakt backoffice.
ContentTypeAttribute Specifies the default Content-Type HTTP header value for the response of the page.
CultureIndependentAttribute Indicates that this property is not culture-bound. The same value will be used for all languages. This is useful for content that has no language-specific text, like most images.
CurrencyAttribute
DateTimeEditorAttribute Renders a date/time editor for this property. If the style is not set, the editor only allows date selection (without time) by default.
DefaultForAttribute Indicates that this property editor is the default editor for the specified type. This attribute can be added multiple times for different types.
DefaultSectionAttribute Specifies the default section name for properties that do not have a section explicitly set. If this attribute is ommitted, the default section name is "Content".
DefaultValueAttribute Sets the default value for the property editor in the Redakt backoffice if the value is undefined.
DisplayNameAttribute Sets the label for the property editor in the Redakt backoffice. If omitted, the label will be generated from the property name.
DisplayOnListAttribute Indicates that the value of the property will be displayed on the library list views in the Redakt backoffice. Only simple property types can have this attribute set.
EditableForAttribute Sets the user groups that are allowed to edit this property in the back office. For any user that is not part of at least one of the provided user groups this property will be read-only.
EditorAttribute Specifies a property editor type to use for the model property.
EnableWorkflowAttribute Specifies whether publish workflow should be enabled for this model. Defaults to true for page models, and false to content models.
ExpandAttribute
HelpTextAttribute Sets the help text that will be displayed alongside the property label in the Redakt backoffice.
HideLabelAttribute Specifies that the property label should be hidden in the back office user interface.
IconAttribute Sets the icon to be displayed for a page, content item or property in the Redakt back office. If not specified, default icons will be selected.
IgnoreMemberAttribute Indicates that this property will be ignored by Redakt CMS. It will not show up or be saved in the backoffice. Set the store parameter to specify if the value should be stored to the database.
KeyAttribute Sets the unique key for the property that is used to save the value to the data store. This is useful if the property name has been changed, but content was already stored with the previous key. If omitted, the key is equal to the property name.
LinkEditorAttribute
MaxCountAttribute Sets the maximum number of items allowed for this property. Only applies to collection properties. This is only enforced in the back office user interface; from code it is possible to add more items than the specified maximum.
MaxLengthAttribute Specifies the maximum length that the property value will be validated against. This is only enforced in the back office user interface; from code it is possible to set a value with a longer length than the specified maximum.
MaxValueAttribute Specifies the maximum value that the property value will be validated against. This is only enforced in the back office user interface; from code it is possible to set a larger value than the specified maximum.
MediaUploadAttribute Indicates that this content view model can be created through a media upload in the back office.
MinCountAttribute Sets the maximum number of items allowed for this property. Only applies to collection properties. This is only enforced in the back office user interface; from code it is possible to add more items than the specified maximum.
MinLengthAttribute Specifies the minimum length that the property value will be validated against. This is only enforced in the back office user interface; from code it is possible to set a value with a shorter length than the specified minimum.
MinValueAttribute Specifies the minimum value that the property value will be validated against. This is only enforced in the back office user interface; from code it is possible to set a smaller value than the specified minimum.
MultilineAttribute Configures the editor as a multiline textbox (textarea).
NameFormatAttribute Sets the name format for content of this content type for use in the Redakt back office. Insert content property values with property keys (not identifiers) in curly braces (case sensitive), for example: "{FirstName} {LastName}". If omitted, the property display name will be used.
NumberEditorAttribute Indicates that this property is a number and should be rendered as a number editor in the back office.
PlaceholderAttribute Specifies a placeholder to display in case of empty property values.
PrefixAttribute Specifies a prefix that will be displayed to the left of single line property editors.
RadioButtonsAttribute Uses the select list editor for this property. Displays a multiple select list in case of a collection type, or a dropdown list otherwise. The option keys will be set as property value. The member type may be string or any other simple type, provided the option key can be converted from string. Options can be set during compile-time by passing them in the constructor, or by registering an ISelectOptionsProvider implementation in the DI container to populate options during runtime.
ReadOnlyAttribute Indicates that this is a read-only property. Editing the value will not be possible in the Redakt backoffice, however modifying the property can still be done from code.
RegexAttribute Specifies a regular expression that the property value will be validated against.
RequiredAttribute Indicates that the property is required. This applies to the back office application only, it is still possible to omit a value programmatically.
RichTextEditorAttribute Uses a rich text (HTML) editor for this property.
SearchIndexAttribute
SectionAttribute Specifies the section name that this property will be grouped under.
SelectListAttribute Renders a select list editor for this property. Displays a multiple select list in case of a collection type, or a dropdown list otherwise. The option keys will be set as property value. The member type may be string or any other simple type, provided the option key can be converted from string. Options can be set during compile-time by passing them in the constructor, or by registering an ISelectOptionsProvider implementation in the DI container to populate options during runtime.
SharedAttribute Indicates that this property type is a shared content model.
SortOrderAttribute Sets the sort order of the property in the back office user interface. Default is 0 if not explicitly set.
StartFolderAttribute
TableEditorAttribute
TagsEditorAttribute Uses a tags editor for this property in the Redakt backoffice. Optionally supply a predefined tag list in the constructor or register an ITagsProvider implementation in the DI container to restrict available tags. If no predefined tags are supplied, the user can enter any value as tags.
ThumbnailAttribute Specifies that this property is the primary media for the content. This media will be used as thumbnail for the content in the back office. Can only be set on property types.
WidthAttribute Specifies the width of the editor in pixels. The default editor width will be used if not set.

Interfaces

Name Description
IContentModelAttribute Attributes implementing this interface can be applied to content view models ().
IPageModelAttribute
IPropertyModelAttribute

Enums

Name Description
PropertyCardinality