API Reference: IconAttribute Class
The IconAttribute
can be applied to content model classes. The attribute specifies the icon to use in the user interface of the back office application when displayed in lists, trees, and dropdowns.
Because node status overlays are sometimes displayed on an icon, rendering an icon for a node is necessary. Therefore, if IconAttribute
is not specified, a default icon will be displayed for the content model, depending on the node type (page, asset, or folder).
Usage
Decorate the content model class with the IconAttribute
. Pass the icon name in the attribute constructor.
The Redakt.BackOffice.Icons.ContentIcons
class in the back office package contains const string
properties for all built-in icon names. See the full list of built-in icons here.
Example
[Page]
[Icon(ContentIcons.Home)]
public class Homepage: IContentType
{
// ...
}
[Asset]
[Icon(ContentIcons.Image)]
public class Image: IContentType
{
// ...
}