Table of Contents

Class GroupInfoViewModelExtensions

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

Extensions for the GroupInfoViewModel class.

public static class GroupInfoViewModelExtensions
Inheritance
GroupInfoViewModelExtensions
Inherited Members

Methods

GetGroup(GroupInfoViewModel)

Retrieves the product group view model for the specified group info view model.

public static ProductGroupViewModel? GetGroup(this GroupInfoViewModel groupInfo)

Parameters

groupInfo GroupInfoViewModel

The group info view model.

Returns

ProductGroupViewModel

The product group view model.

Gets the primary link to a given group and that group's primary page id if specified, otherwise the specified page id.

public static string GetGroupLink(this GroupInfoViewModel group, int pageId, bool usePrimaryGroupPageId = true)

Parameters

group GroupInfoViewModel

The group to create the link for.

pageId int

The page ID that should be used. If a page ID has been specified on the primary group in this shop that the product belongs to, that ID will be used instead of the passed page ID.

usePrimaryGroupPageId bool

A flag indicating whether to use the primary group's page ID.

Returns

string

The group link string.

GetSubGroups(GroupInfoViewModel)

Retrieves the subgroups of the specified group info view model.

public static IEnumerable<GroupInfoViewModel> GetSubGroups(this GroupInfoViewModel model)

Parameters

model GroupInfoViewModel

Returns

IEnumerable<GroupInfoViewModel>

An enumerable collection of group info view models representing the subgroups of the specified group info view model.

SimplePath(IEnumerable<GroupInfoViewModel>)

Generates a simple path by concatenating the names of the group info view models with a forward slash separator.

public static string SimplePath(this IEnumerable<GroupInfoViewModel> groupInfos)

Parameters

groupInfos IEnumerable<GroupInfoViewModel>

The collection of group info view models.

Returns

string

The simple path string.

To top