Enables scripted content fragments to use Groups
Properties
Name | Type | Description | Default | Options |
---|---|---|---|---|
ApplicationTypeId | Guid | Groups application type identifier | ||
ContainerTypeId | Guid | Groups container type identifier | ||
ContentTypeId | Guid | Groups content type identifier | ||
Current | Group | Current contextual group | ||
CurrentGroupPath | IList<Group> | Lists all parent groups of the current group, excluding the current group. Sorted from furthest to nearest ancestor. | ||
Default Obsolete | Group | (OBSOLETE) Default Group | ||
Root | Group | Site root group | ||
ThemeTypeId | Guid | Groups theme type identifier | ||
TotalLicensedRemaining | int | Total number licensed groups |
Methods
Create
Creates a group
Usage
#set($groupResponse = $core_v2_group.Create($name, $groupType))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | string | Name | Required | ||
groupType | string | Group Type | Required |
Return Type
Create
Creates a group
Usage
#set($groupResponse = $core_v2_group.Create($name, $groupType, "%{AutoCreateApplications = $autoCreateApplicationsArg, AvatarFileData = $avatarFileDataArg, AvatarFileName = $avatarFileNameArg, AvatarFileUploadContext = $avatarFileUploadContextArg, Description = $descriptionArg, EnableGroupMessages = $enableGroupMessagesArg, ExtendedAttributes = $extendedAttributesArg, Key = $keyArg, ParentGroupId = $parentGroupIdArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | string | Name | Required | ||
groupType | string | Group Type | Required | Joinless, PrivateListed, PrivateUnlisted, PublicClosed, PublicOpen | |
AutoCreateApplications | bool | Auto Create Applications | Optional | True | |
AvatarFileData | string | Avatar File Data. When adding an image either FileData or FileUploadContext is required. | Optional | ||
AvatarFileName | string | Avatar File Name. Required when updating featured item using FileUploadContext. Optional parameter | Optional | ||
AvatarFileUploadContext | string | Avatar File Upload Context. When adding an image either FileData or FileUploadContext is required. Optional parameter | Optional | ||
Description | string | Description | Optional | ||
EnableGroupMessages | bool | Enable Group Messages | Optional | False | |
ExtendedAttributes | string | Extended attributes are key-value pairs set using the syntax _ExtendedAttributes_key=value. i.e. _ExtendedAttributes_MyKey=MyValue sets ExtendedAttributes["MyKey"] to "MyValue". | Optional | ||
Key | string | If not specified, the key will be generated. | Optional | ||
ParentGroupId | int | Parent Group Id | Optional |
Return Type
Delete
Deletes a group
Usage
#set($additionalInfoResponse = $core_v2_group.Delete($id))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Id | Required |
Return Type
Delete
Deletes a group
Usage
#set($additionalInfoResponse = $core_v2_group.Delete($id, $deleteApplications))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Id | Required | ||
deleteApplications | bool? | Set to true if you want to delete child applications along with the group. | Required | False |
Return Type
Get
Gets a group
Usage
#set($groupResponse = $core_v2_group.Get("%{ContainerId = $containerIdArg, Id = $idArg, Key = $keyArg, ParentGroupId = $parentGroupIdArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ContainerId | Guid | ContainerId, Id, or Key + ParentGroupId is required. | Optional | ||
Id | int | ContainerId, Id, or Key + ParentGroupId is required. | Optional | ||
Key | string | ContainerId, Id, or Key + ParentGroupId is required. | Optional | ||
ParentGroupId | int | ContainerId, Id, or Key + ParentGroupId is required. | Optional |
Return Type
Get
Gets a group
Usage
#set($groupResponse = $core_v2_group.Get($containerId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
containerId | Guid | Container Id | Required |
Return Type
HasNewPostLinks
Returns whether a group has new post links
Usage
#set($booleanResponse = $core_v2_group.HasNewPostLinks($id))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Group Id | Required |
Return Type
bool
IsFavorite
Returns favorite status for the accessing user
Usage
#set($booleanResponse = $core_v2_group.IsFavorite($id))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Id | Required |
Return Type
bool
IsGroupMember
Determines if a user is a membber of a group
Usage
#set($booleanResponse = $core_v2_group.IsGroupMember($groupId, $userId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
groupId | int | Group Id | Required | ||
userId | int | User Id | Required |
Return Type
bool
List
Lists groups
Usage
#set($pagedListResponse = $core_v2_group.List("%{ContainerIds = $containerIdsArg, GroupNameFilter = $groupNameFilterArg, GroupTypes = $groupTypesArg, IncludeAllSubGroups = $includeAllSubGroupsArg, IncludePendingMemberships = $includePendingMembershipsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, ParentGroupId = $parentGroupIdArg, Permission = $permissionArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, UserId = $userIdArg, Username = $usernameArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ContainerIds | string | Comma separated list of ContainerIds. Used to limit to a specific set of groups as well as sort order if SortBy is set to ContainerIdsOrder | Optional | ||
GroupNameFilter | string | Filters based on group name | Optional | ||
GroupTypes | string | Group Types | Optional | All, Joinless, PrivateListed, PrivateUnlisted, PublicClosed, PublicOpen | |
IncludeAllSubGroups | bool | Used when getting child groups, will return all subgroups recursively. | Optional | ||
IncludePendingMemberships | bool | When getting groups for a user, include groups where user has PendingMembership | Optional | ||
PageIndex | int | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | int | Specify the number of results to return per page. | Optional | 20 | |
ParentGroupId | int | Setting a Parent Group Id returns just the child groups for the group. | Optional | ||
Permission | string | Used to get a list of groups for which the user set in UserId has the provided Permission ID. | Optional | ||
SortBy | string | Sort By | Optional | Name | ContainerIdsOrder, LastUpdate, Name, SortOrder |
SortOrder | string | Sort Order | Optional | Ascending | Ascending, Descending |
UserId | int | User ID to check permissions. This option is only used whenever the PermissionId is also supplied. | Optional | ||
Username | string | Username | Optional |
Return Type
ListNewPostLinks
Returns new post links for a group
Usage
#set($iListResponse = $core_v2_group.ListNewPostLinks($id))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Group Id | Required |
Return Type
IList<GroupNewPostLink>
ListTaggedContent
Lists tagged content. This method is supported for backwards compatibility, but $core_v2_taggedContent.List() should be used if possible.
Usage
#set($pagedListResponse = $core_v2_group.ListTaggedContent($tags, "%{GroupId = $groupIdArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
tags | IList<string> | Tags | Required | ||
GroupId | int | Group Id | Optional | ||
PageIndex | int | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | int | Specify the number of results to return per page. | Optional | 20 |
Return Type
ListTags
Lists tags. This method is supported for backwards compatibility, but $core_v2_tags.List() should be used if possible.
Usage
#set($pagedListResponse = $core_v2_group.ListTags("%{FilterTags = $filterTagsArg, GroupId = $groupIdArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
FilterTags | IList<string> | Filter Tags | Optional | ||
GroupId | int | Group Id | Optional | ||
PageIndex | int | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | int | Specify the number of results to return per page. | Optional | 20 |
Return Type
Search
Searches groups
Usage
#set($pagedListResponse = $core_v2_group.Search($queryText, "%{PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
queryText | string | Query Text | Required | ||
PageIndex | int | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | int | Specify the number of results to return per page. | Optional | 20 |
Return Type
SetFavorite
Sets favorite status for the accessing user
Usage
$core_v2_group.SetFavorite($id, $favorite)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Id | Required | ||
favorite | bool | Favorite | Required |
Update
Updates a group
Usage
#set($groupResponse = $core_v2_group.Update($id, "%{AvatarFileData = $avatarFileDataArg, AvatarFileName = $avatarFileNameArg, AvatarFileUploadContext = $avatarFileUploadContextArg, Description = $descriptionArg, EnableContactForm = $enableContactFormArg, EnableGroupMessages = $enableGroupMessagesArg, ExtendedAttributes = $extendedAttributesArg, GroupType = $groupTypeArg, Key = $keyArg, Name = $nameArg, ParentGroupId = $parentGroupIdArg, RemoveAvatarImage = $removeAvatarImageArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | int | Id | Required | ||
AvatarFileData | string | Avatar File Data. When adding an image either FileData or FileUploadContext is required. | Optional | ||
AvatarFileName | string | Avatar File Name. Required when updating featured item using FileUploadContext. Optional parameter | Optional | ||
AvatarFileUploadContext | string | Avatar File Upload Context. When adding an image either FileData or FileUploadContext is required. Optional parameter | Optional | ||
Description | string | Description | Optional | ||
EnableContactForm | bool | Enable Contact Form | Optional | ||
EnableGroupMessages | bool | Enable Group Messages | Optional | ||
ExtendedAttributes | string | Extended attributes are key-value pairs set using the syntax _ExtendedAttributes_key=value. i.e. _ExtendedAttributes_MyKey=MyValue sets ExtendedAttributes["MyKey"] to "MyValue". | Optional | ||
GroupType | string | Group Type | Optional | Joinless, PrivateListed, PrivateUnlisted, PublicClosed, PublicOpen | |
Key | string | If not specified, the key will be generated. | Optional | ||
Name | string | Name | Optional | ||
ParentGroupId | int | Parent Group Id | Optional | ||
RemoveAvatarImage | bool | If, true uploaded avatar image will be removed and default avatar will be used. | Optional |