API Reference: ExpandedAttribute Class
The ExpandedAttribute
can be applied to nested content properties only. The attribute specifies that the nested content should be expanded when loading the node detail view. This attribute has no effect when EmbeddedAttribute
is set.
If ExpandedAttribute
is not specified, the nested content will start out as collapsed in the back office user interface.
Usage
Decorate the content model property with the ExpandedAttribute. The attribute does not require any parameters. The attribute is only effective for content model-based properties (both single and collection) of a type that implements IContentType
.
Example
[Page]
public class ContentPage: IContentType
{
// Single SeoContent model is expanded by default.
[Expanded]
public SeoContent Seo { get; set; }
// ModuleBase collection is expanded by default.
[Expanded]
public ICollection<ModuleBase> Modules { get; set; }
}