Table of Contents

Class UserGroupDetailViewModel

Namespace
Dynamicweb.Users.Frontend.UserGroups
Assembly
Dynamicweb.Users.dll

View model for the UserGroup frontend module.

public sealed class UserGroupDetailViewModel : UserGroupViewModel
Inheritance
UserGroupDetailViewModel
Inherited Members
Extension Methods

Examples

Razor template usage:

@inherits ViewModelTemplate<Dynamicweb.Users.Frontend.UserGroups.UserGroupDetailViewModel> @using Dynamicweb.Users.Frontend.UserGroups

<form method="post"> <label for="Name">Group name</label> <input id="Name" name="Name" value="@Model.Name" />

<label for="Description">Description</label> <textarea id="Description" name="Description">@Model.Description&lt;/textarea&gt;

<button type="submit">Save</button>

@if (Model.Result != UserGroupResultType.None) { <p class="form-message">@Translate(Model.Result.ToString())&lt;/p&gt; } </form>

Remarks

This model is provided to Razor templates that display or edit a specific user group. It extends UserGroupViewModel with an additional Result property representing the outcome of the most recent update attempt.

Templates typically render a form that posts updated group fields to an endpoint implemented by the User Groups module. The Result value can then be used to show confirmation or error messages to the editor.

Properties

Result

Gets or sets the outcome of the most recent edit attempt.

public UserGroupResultType Result { get; set; }

Property Value

UserGroupResultType

Remarks

Use this to render success or error feedback in the edit template. Defaults to None.

See Also

To top