Enables scripted content fragments to use Galleries
- Properties
- Create
- Delete
- Get
- IsDisclaimerEnabled
- List
- ListForQuickPost
- ListTaggedContent
- ListTags
- Search
- Update
Properties
Name | Access | Type | Description |
---|---|---|---|
ApplicationTypeId | Read | Guid | Galleries application type identifier |
ContentTypeId | Read | Guid | Galleries content type identifier |
Current | Read | Gallery | Current contextual Gallery |
TotalLicensedRemaining | Read | Int32 | Total number licensed galleris |
Methods
Create
Creates a Gallery
Velocity
#set($galleryResponse = $core_v2_gallery.Create($groupId, $name, "%{ Description = $descriptionArg, Enabled = $enabledArg, ExtendedAttributes = $extendedAttributesArg, Key = $keyArg, Owners = $ownersArg }"))
JavaScript
var galleryResponse = core_v2_gallery.Create(groupId, name, { Description: descriptionArg, Enabled: enabledArg, ExtendedAttributes: extendedAttributesArg, Key: keyArg, Owners: ownersArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
groupId | Int32 | Group Id | Required | ||
name | String | Name | Required | ||
Description | String | Description | Optional | An empty string | |
Enabled | Boolean | Enabled | Optional | True | |
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 | ||
Owners | String | Comma separated list of usernames | Optional |
Returns
Delete
Deletes a Gallery
Velocity
#set($additionalInfoResponse = $core_v2_gallery.Delete($id))
JavaScript
var additionalInfoResponse = core_v2_gallery.Delete(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id | Required |
Returns
Get
Get Overload 1
Gets a Gallery
Velocity
#set($galleryResponse = $core_v2_gallery.Get("%{ GroupId = $groupIdArg, Id = $idArg, Key = $keyArg }"))
JavaScript
var galleryResponse = core_v2_gallery.Get({ GroupId: groupIdArg, Id: idArg, Key: keyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
GroupId | Int32 | Either Id or Key + GroupId are required | Optional | ||
Id | Int32 | Either Id or Key + GroupId are required | Optional | ||
Key | String | Either Id or Key + GroupId are required | Optional |
Get Overload 2
Gets a Gallery
Velocity
#set($galleryResponse = $core_v2_gallery.Get($applicationId))
JavaScript
var galleryResponse = core_v2_gallery.Get(applicationId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
applicationId | Guid | Application Id | Required |
Returns
IsDisclaimerEnabled
Returns whether a gallery is configured to show a disclaimer before downloading
Velocity
#set($booleanResponse = $core_v2_gallery.IsDisclaimerEnabled($galleryId))
JavaScript
var booleanResponse = core_v2_gallery.IsDisclaimerEnabled(galleryId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
galleryId | Int32 | Gallery Id | Required |
Returns
Boolean
List
Lists Galleries
Velocity
#set($pagedListResponse = $core_v2_gallery.List("%{ ApplicationIds = $applicationIdsArg, GroupId = $groupIdArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, PermissionId = $permissionIdArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, UserId = $userIdArg }"))
JavaScript
var pagedListResponse = core_v2_gallery.List({ ApplicationIds: applicationIdsArg, GroupId: groupIdArg, IncludeSubGroups: includeSubGroupsArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, PermissionId: permissionIdArg, SortBy: sortByArg, SortOrder: sortOrderArg, UserId: userIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ApplicationIds | String | Comma separated list of ApplicationIds. Used to limit to a specific set of galleries as well as sort order if SoryBy is set to ApplicationIdsOrder | Optional | ||
GroupId | Int32 | Group Id | Optional | ||
IncludeSubGroups | Boolean | Only used when GroupId is specified. | Optional | False | |
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 | |
PermissionId | String | Used to get a list of galleries for which the accessing or impersonated user has the provided Permission ID. | Optional | ||
SortBy | String | Sort By | Optional | SortOrder | ApplicationIdsOrder, DateCreate, LastPost, Name, Post, SortOrder, Thread, TotalPosts |
SortOrder | String | Sort Order | Optional | Ascending | Ascending, Descending |
UserId | Int32 | Obsolete in 9.2: User Id should no longer be used. Rely on the authenticated or impersonated user instead. | Optional |
Returns
ListForQuickPost
Lists galleries available for a quick post context for the accessing user and current group
Velocity
#set($iListResponse = $core_v2_gallery.ListForQuickPost())
JavaScript
var iListResponse = core_v2_gallery.ListForQuickPost();
Returns
IList of Gallery
ListTaggedContent
Lists tagged content. DEPRECATED: This method is supported for backwards compatibility, but $core_v2_taggedContent.List() should be used if possible.
Velocity
#set($pagedListResponse = $core_v2_gallery.ListTaggedContent($tags, "%{ GalleryId = $galleryIdArg, GroupId = $groupIdArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg }"))
JavaScript
var pagedListResponse = core_v2_gallery.ListTaggedContent(tags, { GalleryId: galleryIdArg, GroupId: groupIdArg, PageIndex: pageIndexArg, PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
tags | IList of String | Tags | Required | ||
GalleryId | Int32 | Gallery Id | 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
ListTags
Lists tags in a Gallery. DEPRECATED: This method is supported for backwards compatibility, but $core_v2_tags.List() should be used if possible.
Velocity
#set($pagedListResponse = $core_v2_gallery.ListTags("%{ FilterTags = $filterTagsArg, GalleryId = $galleryIdArg, GroupId = $groupIdArg, MinimumItemsPerTag = $minimumItemsPerTagArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg }"))
JavaScript
var pagedListResponse = core_v2_gallery.ListTags({ FilterTags: filterTagsArg, GalleryId: galleryIdArg, GroupId: groupIdArg, MinimumItemsPerTag: minimumItemsPerTagArg, PageIndex: pageIndexArg, PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
FilterTags | IList of String | Tags to filter by | Optional | ||
GalleryId | Int32 | Gallery Id | Optional | ||
GroupId | Int32 | Group Id | Optional | ||
MinimumItemsPerTag | Int32 | Minimum Items Per Tag | Optional | ||
PageIndex | Int32 | Page Index | Optional | 0 | |
PageSize | Int32 | Page Size | Optional | 100 |
Returns
Search
Search Galleries
Velocity
#set($pagedListResponse = $core_v2_gallery.Search($queryText, "%{ GroupId = $groupIdArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg }"))
JavaScript
var pagedListResponse = core_v2_gallery.Search(queryText, { GroupId: groupIdArg, IncludeSubGroups: includeSubGroupsArg, PageIndex: pageIndexArg, PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
queryText | String | Query Text | Required | ||
GroupId | Int32 | Group Id | Optional | ||
IncludeSubGroups | Boolean | Include Sub Groups | Optional | False | |
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
Update
Updates a Gallery
Velocity
#set($galleryResponse = $core_v2_gallery.Update($id, "%{ Description = $descriptionArg, Enabled = $enabledArg, ExtendedAttributes = $extendedAttributesArg, GroupId = $groupIdArg, Key = $keyArg, Name = $nameArg, Owners = $ownersArg }"))
JavaScript
var galleryResponse = core_v2_gallery.Update(id, { Description: descriptionArg, Enabled: enabledArg, ExtendedAttributes: extendedAttributesArg, GroupId: groupIdArg, Key: keyArg, Name: nameArg, Owners: ownersArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id | Required | ||
Description | String | Description | Optional | An empty string | |
Enabled | Boolean | Enabled | Optional | True | |
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 | ||
GroupId | Int32 | Group Id | Optional | ||
Key | String | If not specified, the key will be generated. | Optional | ||
Name | String | Name | Optional | ||
Owners | String | Comma separated list of usernames | Optional |