Enables scripted content fragments to use Galleries

Properties

NameTypeDescriptionDefaultOptions
ApplicationTypeIdGuidGalleries application type identifier
ContentTypeIdGuidGalleries content type identifier
CurrentGalleryCurrent contextual Gallery

Methods

Create

Creates a Gallery

Usage

#set($galleryResponse = $core_v2_gallery.Create($groupId, $name, "%{Description = $descriptionArg, Enabled = $enabledArg, Key = $keyArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
groupIdintGroup IdRequired
namestringNameRequired
DescriptionstringDescriptionOptionalAn empty string
EnabledboolEnabledOptionalTrue
KeystringIf not specified, the key will be generated.Optional

Return Type

Gallery

Delete

Deletes a Gallery

Usage

#set($additionalInfoResponse = $core_v2_gallery.Delete($id))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idintIdRequired

Return Type

AdditionalInfo

Get

Gets a Gallery

Usage

#set($galleryResponse = $core_v2_gallery.Get("%{GroupId = $groupIdArg, Id = $idArg, Key = $keyArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
GroupIdintEither Id or Key + GroupId are requiredOptional
IdintEither Id or Key + GroupId are requiredOptional
KeystringEither Id or Key + GroupId are requiredOptional

Return Type

Gallery

Get

Gets a Gallery

Usage

#set($galleryResponse = $core_v2_gallery.Get($applicationId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
applicationIdGuidApplication IdRequired

Return Type

Gallery

IsDisclaimerEnabled

Returns whether a gallery is configured to show a disclaimer before downloading

Usage

#set($booleanResponse = $core_v2_gallery.IsDisclaimerEnabled($galleryId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
galleryIdintGallery IdRequired

Return Type

bool

IsFavorite

Returns favorited status for the accessing user

Usage

#set($booleanResponse = $core_v2_gallery.IsFavorite($galleryId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
galleryIdintGallery IdRequired

Return Type

bool

List

Lists Galleries

Usage

#set($pagedListResponse = $core_v2_gallery.List("%{GroupId = $groupIdArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, PermissionId = $permissionIdArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, UserId = $userIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
GroupIdintGroup IdOptional
IncludeSubGroupsboolOnly used when GroupId is specified.OptionalFalse
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page.Optional20
PermissionIdstringUsed to get a list of galleries for which the user set in UserId has the provided Permission ID.Optional
SortBystringSort ByOptionalSortOrderDateCreate, LastPost, Name, Post, Score:SCORE_ID, SortOrder, Thread, TotalPosts
SortOrderstringSort OrderOptionalAscendingAscending, Descending
UserIdintUser ID for which to check permissions. This option is only used whenever the PermissionId is also supplied.Optional

Return Type

PagedList<Gallery>

ListForQuickPost

Lists galleries available for a quick post context for the accessing user and current group

Usage

#set($iListResponse = $core_v2_gallery.ListForQuickPost())

Return Type

IList<Gallery>

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_gallery.ListTaggedContent($tags, "%{GalleryId = $galleryIdArg, GroupId = $groupIdArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
tagsIList<string>TagsRequired
GalleryIdintGallery IdOptional
GroupIdintGroup IdOptional
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page.Optional20

Return Type

PagedList<TaggedContent>

ListTags

Lists tags in a Gallery. This method is supported for backwards compatibility, but $core_v2_tags.List() should be used if possible.

Usage

#set($pagedListResponse = $core_v2_gallery.ListTags("%{FilterTags = $filterTagsArg, GalleryId = $galleryIdArg, GroupId = $groupIdArg, MinimumItemsPerTag = $minimumItemsPerTagArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
FilterTagsIList<string>Tags to filter byOptional
GalleryIdintGallery IdOptional
GroupIdintGroup IdOptional
MinimumItemsPerTagintMinimum Items Per TagOptional
PageIndexintPage IndexOptional0
PageSizeintPage SizeOptional100

Return Type

PagedList<Tag>

Search

Search Galleries

Usage

#set($pagedListResponse = $core_v2_gallery.Search($queryText, "%{GroupId = $groupIdArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
queryTextstringQuery TextRequired
GroupIdintGroup IdOptional
IncludeSubGroupsboolInclude Sub GroupsOptionalFalse
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page.Optional20

Return Type

PagedList<SearchResult>

SetFavorite

Sets favorite status for the accessing user

Usage

$core_v2_gallery.SetFavorite($galleryId, $favorite)

Parameters

NameTypeDescriptionRequiredDefaultOptions
galleryIdintGallery IdRequired
favoriteboolFavorite StatusRequired

Update

Updates a Gallery

Usage

#set($galleryResponse = $core_v2_gallery.Update($id, "%{Description = $descriptionArg, Enabled = $enabledArg, GroupId = $groupIdArg, Key = $keyArg, Name = $nameArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idintIdRequired
DescriptionstringDescriptionOptionalAn empty string
EnabledboolEnabledOptionalTrue
GroupIdintGroup IdOptional
KeystringIf not specified, the key will be generated.Optional
NamestringNameOptional

Return Type

Gallery