Table of Contents

Class FieldGroupViewModel

Namespace
Dynamicweb.Ecommerce.ProductCatalog
Assembly
Dynamicweb.Ecommerce.dll

Represents a product display group and the field values it contains.

public class FieldGroupViewModel : ViewModelBase
Inheritance
FieldGroupViewModel
Inherited Members

Remarks

In Dynamicweb, product fields can be organised into named display groups for structured rendering. Each display group is represented by this view model and exposes its fields as a list of FieldValueViewModel instances.

In Razor templates, iterate Fields to render all fields in the group:

@foreach (var group in Model.Product.FieldDisplayGroups)
{
    <h3>@group.Name</h3>
    @foreach (var field in group.Fields)
    {
        <p>@field.Name: @field</p>
    }
}

Properties

Fields

Gets or sets the field values belonging to this display group. Each FieldValueViewModel exposes the field name, type, and value.

public List<FieldValueViewModel> Fields { get; set; }

Property Value

List<FieldValueViewModel>

Name

Gets or sets the display name of the field group shown as a section heading in the template (e.g. "Technical Specs").

public string Name { get; set; }

Property Value

string

SystemName

Gets or sets the system name of the field group used as a stable identifier for targeting specific groups in code.

public string SystemName { get; set; }

Property Value

string

See Also

To top