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
groupInfoGroupInfoViewModelThe group info view model.
Returns
- ProductGroupViewModel
The product group view model.
GetGroupLink(GroupInfoViewModel, int, bool)
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
groupGroupInfoViewModelThe group to create the link for.
pageIdintThe 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.
usePrimaryGroupPageIdboolA 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
modelGroupInfoViewModel
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
groupInfosIEnumerable<GroupInfoViewModel>The collection of group info view models.
Returns
- string
The simple path string.