API Reference: EmbeddedAttribute Class

The EmbeddedAttribute can be applied to content model properties. The attribute specifies that the content of a single-value nested content property will be embedded into its master content model, flattening and merging the properties list of the property model and the containing class in the back office user interface. This allows nested content to be presented as part of the content model in the user interface while keeping it a separate model class in code.

If EmbeddedAttribute is not specified, the property will be rendered as a regular nested content item.


Decorate the content model property with the EmbeddedAttribute. The attribute does not require any parameters. The attribute can only be set on single content model-based properties of a type that implements IContentType. Setting it on any other property type will cause an invalid configuration exception on system startup.


public class ContentPage: IContentType
    // SeoContent model properties will be rendered as if they were direct properties of the ContentPage model.
    public SeoContent Seo { get; set; }
    // OtherContent model will be rendered as regular nested content view.
    public OtherContent Content { get; set; }

    // This will throw an invalid configuration exception as collections can not be rendered as embedded.
    public ICollection<ModuleBase> Modules { get; set; }

    // This will throw an invalid configuration exception as property types must be nested content models implementing IContentType.
    public string StringValue { get; set; }