cofoundry icon indicating copy to clipboard operation
cofoundry copied to clipboard

Dynamic Data Models: Property grouping

Open HeyJoel opened this issue 8 years ago • 0 comments

It would be good to be able to support property grouping so we don't have to group all properties in the same section in the admin UI.

This could be done via the DisplayAttribute.Group property but a better way might be to use child data models like this:

public class ProductDataModel : ICustomEntityDataModel
{
    [PropertyGroup(Collapsable = false)]
    public ProductSummaryData Summary { get; set; }

    [PropertyGroup]
    [Display(Description = "Search engine optimization properties")]
    public SEOData SEO { get; set; }

    [PropertyGroup]
    public ProductPricingData Pricing { get; set; }
}

This would be a bit more verbose but they would be reusable and it would make more sense and you would be able to have more control over the behavior of the group as you'd be using just a single attribute.

Issue #267 is a duplicate request for this feature.

HeyJoel avatar Feb 07 '17 10:02 HeyJoel