Enables scripted content fragments to use Groups
- Properties
- Create
- Delete
- Get
- HasNewPostLinks
- IsFavorite
- IsGroupMember
- List
- ListNewPostLinks
- ListTaggedContent
- ListTags
- Search
- SetFavorite
- Update
Properties
Name | Access | Type | Description |
---|---|---|---|
ApplicationTypeId | Read | Guid | Groups application type identifier |
ContainerTypeId | Read | Guid | Groups container type identifier |
ContentTypeId | Read | Guid | Groups content type identifier |
Current | Read | Group | Current contextual group |
CurrentGroupPath | Read | IList of Group | Lists all parent groups of the current group, excluding the current group. Sorted from furthest to nearest ancestor. |
Default | Read | Group | (OBSOLETE) Default Group |
Root | Read | Group | Site root group |
ThemeTypeId | Read | Guid | Groups theme type identifier |
TotalLicensedRemaining | Read | Int32 | Total number licensed groups |
Methods
Create
Create Overload 1
Creates a group
Velocity
#set($groupResponse = $core_v2_group.Create($name, $groupType))
JavaScript
var groupResponse = core_v2_group.Create(name, groupType);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
name | String | Name | Required | ||
groupType | String | Group Type | Required |
Create Overload 2
Creates a group
Velocity
#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 }"))
JavaScript
var 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 | |
options | Options | Set of optional parameters including: | Required | ||
AutoCreateApplications | Boolean | Auto Create Applications | Optional | True | |
AvatarFileData | Array of Byte | Avatar File Data. When adding an image either FileData or FileUploadContext is required. OBSOLETE in 12: Use AvatarFileUploadContext instead. | Optional | ||
AvatarFileName | String | Avatar File Name. Required when updating featured item using AvatarFileUploadContext. Optional parameter | Optional | ||
AvatarFileUploadContext | String | Avatar File Upload Context. When adding an image either AvatarFileData or AvatarFileUploadContext is required. Optional parameter | Optional | ||
Description | String | Description | Optional | ||
EnableGroupMessages | Boolean | 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 | Int32 | Parent Group Id | Optional |
Returns
Delete
Delete Overload 1
Deletes a group
Velocity
#set($additionalInfoResponse = $core_v2_group.Delete($id))
JavaScript
var additionalInfoResponse = core_v2_group.Delete(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id | Required |
Delete Overload 2
Deletes a group
Velocity
#set($additionalInfoResponse = $core_v2_group.Delete($id, $deleteApplications))
JavaScript
var additionalInfoResponse = core_v2_group.Delete(id, deleteApplications);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id | Required | ||
deleteApplications | Nullable of Boolean | Set to true if you want to delete child applications along with the group. | Required | False |
Returns
Get
Get Overload 1
Gets a group
Velocity
#set($groupResponse = $core_v2_group.Get("%{ ContainerId = $containerIdArg, Id = $idArg, Key = $keyArg, ParentGroupId = $parentGroupIdArg }"))
JavaScript
var groupResponse = core_v2_group.Get({ ContainerId: containerIdArg, Id: idArg, Key: keyArg, ParentGroupId: parentGroupIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
ContainerId | Guid | ContainerId, Id, or Key + ParentGroupId is required. | Optional | ||
Id | Int32 | ContainerId, Id, or Key + ParentGroupId is required. | Optional | ||
Key | String | ContainerId, Id, or Key + ParentGroupId is required. | Optional | ||
ParentGroupId | Int32 | ContainerId, Id, or Key + ParentGroupId is required. | Optional |
Get Overload 2
Gets a group
Velocity
#set($groupResponse = $core_v2_group.Get($containerId))
JavaScript
var groupResponse = core_v2_group.Get(containerId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
containerId | Guid | Container Id | Required |
Returns
HasNewPostLinks
Returns whether a group has new post links
Velocity
#set($booleanResponse = $core_v2_group.HasNewPostLinks($id))
JavaScript
var booleanResponse = core_v2_group.HasNewPostLinks(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Group Id | Required |
Returns
Boolean
IsFavorite
Returns favorite status for the accessing user
Velocity
#set($booleanResponse = $core_v2_group.IsFavorite($id))
JavaScript
var booleanResponse = core_v2_group.IsFavorite(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id | Required |
Returns
Boolean
IsGroupMember
Determines if a user is a membber of a group
Velocity
#set($booleanResponse = $core_v2_group.IsGroupMember($groupId, $userId))
JavaScript
var booleanResponse = core_v2_group.IsGroupMember(groupId, userId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
groupId | Int32 | Group Id | Required | ||
userId | Int32 | User Id | Required |
Returns
Boolean
List
Lists groups
Velocity
#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 }"))
JavaScript
var 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 |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
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 | Boolean | Used when getting child groups, will return all subgroups recursively. | Optional | ||
IncludePendingMemberships | Boolean | When getting groups for a user, include groups where user has PendingMembership | Optional | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 | |
ParentGroupId | Int32 | 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 | Int32 | User ID to check permissions. This option is only used whenever the PermissionId is also supplied. | Optional | ||
Username | String | Username | Optional |
Returns
ListNewPostLinks
Returns new post links for a group
Velocity
#set($iListResponse = $core_v2_group.ListNewPostLinks($id))
JavaScript
var iListResponse = core_v2_group.ListNewPostLinks(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Group Id | Required |
Returns
IList of GroupNewPostLink
ListTaggedContent
Lists tagged content. This method is supported for backwards compatibility, but $core_v2_taggedContent.List() should be used if possible.
Velocity
#set($pagedListResponse = $core_v2_group.ListTaggedContent($tags, "%{ GroupId = $groupIdArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg }"))
JavaScript
var pagedListResponse = core_v2_group.ListTaggedContent(tags, { GroupId: groupIdArg, PageIndex: pageIndexArg, PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
tags | IList of String | Tags | Required | ||
options | Options | Set of optional parameters including: | Required | ||
GroupId | Int32 | Group Id | Optional | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 |
Returns
ListTags
Lists tags. This method is supported for backwards compatibility, but $core_v2_tags.List() should be used if possible.
Velocity
#set($pagedListResponse = $core_v2_group.ListTags("%{ FilterTags = $filterTagsArg, GroupId = $groupIdArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg }"))
JavaScript
var pagedListResponse = core_v2_group.ListTags({ FilterTags: filterTagsArg, GroupId: groupIdArg, PageIndex: pageIndexArg, PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
FilterTags | IList of String | Filter Tags | Optional | ||
GroupId | Int32 | Group Id | Optional | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 |
Returns
Search
Searches groups
Velocity
#set($pagedListResponse = $core_v2_group.Search($queryText, "%{ PageIndex = $pageIndexArg, PageSize = $pageSizeArg }"))
JavaScript
var pagedListResponse = core_v2_group.Search(queryText, { PageIndex: pageIndexArg, PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
queryText | String | Query Text | Required | ||
options | Options | Set of optional parameters including: | Required | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 |
Returns
SetFavorite
Sets favorite status for the accessing user
Velocity
$core_v2_group.SetFavorite($id, $favorite)
JavaScript
core_v2_group.SetFavorite(id, favorite);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id | Required | ||
favorite | Boolean | Favorite | Required |
Returns
NothingUpdate
Updates a group
Velocity
#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 }"))
JavaScript
var 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 | Int32 | Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
AvatarFileData | Array of Byte | Avatar File Data. When adding an image either AvatarFileData or AvatarFileUploadContext is required. OBSOLETE in 12: Use AvatarFileUploadContext instead. | Optional | ||
AvatarFileName | String | Avatar File Name. Required when updating featured item using AvatarFileUploadContext. Optional parameter | Optional | ||
AvatarFileUploadContext | String | Avatar File Upload Context. When adding an image either AvatarFileData or AvatarFileUploadContext is required. Optional parameter | Optional | ||
Description | String | Description | Optional | ||
EnableContactForm | Boolean | Enable Contact Form | Optional | ||
EnableGroupMessages | Boolean | 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 | Int32 | Parent Group Id | Optional | ||
RemoveAvatarImage | Boolean | If, true uploaded avatar image will be removed and default avatar will be used. | Optional |