Enables scripted content fragments to use WikiPages
- Properties
- AreRatingsEnabled
- Create
- Delete
- Get
- GetRating
- IncrementViewCount
- IsSubscribed
- List
- SetRating
- SetSubscribed
- Update
Properties
Name | Access | Type | Description |
---|---|---|---|
CommentSubscriptionTypeId | Read | Guid | Comment Subscription Type Id |
ContentTypeId | Read | Guid | Wiki pages content type identifier |
Current | Read | WikiPage | Returns the current contextual wiki page |
CurrentOrDefault | Read | WikiPage | Returns the current or default wiki page |
CurrentPageKey | Read | String | Current Page Key |
CurrentParent | Read | WikiPage | Parent of current wiki page |
Default | Read | WikiPage | Returns the default wiki page for the current wiki context |
Methods
AreRatingsEnabled
Returns whether ratings are enabled on a page. DEPRECATED: Use $core_v2_rating.CanCreate() instead.
Velocity
#set($booleanResponse = $core_v2_wikiPage.AreRatingsEnabled($id))
JavaScript
var booleanResponse = core_v2_wikiPage.AreRatingsEnabled(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Wiki Page Id | Required |
Returns
Boolean
Create
Create Overload 1
Creates a Wiki Page
Velocity
#set($wikiPageResponse = $core_v2_wikiPage.Create($wikiId, $title))
JavaScript
var wikiPageResponse = core_v2_wikiPage.Create(wikiId, title);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
wikiId | Int32 | Wiki Id | Required | ||
title | String | Title | Required |
Create Overload 2
Creates a Wiki Page
Velocity
#set($wikiPageResponse = $core_v2_wikiPage.Create($wikiId, $title, "%{ Body = $bodyArg, CreatedDate = $createdDateArg, FeaturedImage = $featuredImageArg, ForumThreadId = $forumThreadIdArg, HideInTableOfContents = $hideInTableOfContentsArg, IsFeatured = $isFeaturedArg, IsLocked = $isLockedArg, IsPublished = $isPublishedArg, MetaDescription = $metaDescriptionArg, MetaKeywords = $metaKeywordsArg, MetaTitle = $metaTitleArg, ParentPageId = $parentPageIdArg, Position = $positionArg, Tags = $tagsArg, UserId = $userIdArg }"))
JavaScript
var wikiPageResponse = core_v2_wikiPage.Create(wikiId, title, { Body: bodyArg, CreatedDate: createdDateArg, FeaturedImage: featuredImageArg, ForumThreadId: forumThreadIdArg, HideInTableOfContents: hideInTableOfContentsArg, IsFeatured: isFeaturedArg, IsLocked: isLockedArg, IsPublished: isPublishedArg, MetaDescription: metaDescriptionArg, MetaKeywords: metaKeywordsArg, MetaTitle: metaTitleArg, ParentPageId: parentPageIdArg, Position: positionArg, Tags: tagsArg, UserId: userIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
wikiId | Int32 | Wiki Id | Required | ||
title | String | Title | Required | ||
options | Options | Set of optional parameters including: | Required | ||
Body | String | Body | Optional | ||
CreatedDate | DateTime | Date wiki page was created. | Optional | DateTime.Now | |
FeaturedImage | String | Used to include a featured image when IsFeatured is true. | Optional | ||
ForumThreadId | Int32 | Related Forum Thread | Optional | ||
HideInTableOfContents | Boolean | When true this page will not be listed in the table of contents. | Optional | ||
IsFeatured | Boolean | Is Featured | Optional | False | |
IsLocked | Boolean | Is Locked | Optional | False | |
IsPublished | Boolean | Is Published | Optional | True | |
MetaDescription | String | Description used in meta description tag. | Optional | ||
MetaKeywords | String | Keywords for the meta keyword tag. | Optional | ||
MetaTitle | String | Title used in page's title tag. | Optional | ||
ParentPageId | Int32 | Parent Page Id | Optional | ||
Position | Int32 | Position in the table of contents relative to the parent with the first child being 1 and then increasing sequentially. Only applies to listing the table of contents. | Optional | ||
Tags | String | A comma separated list of tags. | Optional | ||
UserId | Int32 | User Id | Optional |
Returns
Delete
Deletes a Wiki Page
Velocity
#set($additionalInfoResponse = $core_v2_wikiPage.Delete($wikiPageId, "%{ DeleteChildPages = $deleteChildPagesArg }"))
JavaScript
var additionalInfoResponse = core_v2_wikiPage.Delete(wikiPageId, { DeleteChildPages: deleteChildPagesArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
wikiPageId | Int32 | Wiki Page Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
DeleteChildPages | Boolean | Also delete any pages with this page as its parent. Optional. | Optional | False |
Returns
Get
Get Overload 1
Gets a Wiki Page
Velocity
#set($wikiPageResponse = $core_v2_wikiPage.Get("%{ ForumThreadId = $forumThreadIdArg, Id = $idArg, PageKey = $pageKeyArg, PageTitle = $pageTitleArg, WikiId = $wikiIdArg }"))
JavaScript
var wikiPageResponse = core_v2_wikiPage.Get({ ForumThreadId: forumThreadIdArg, Id: idArg, PageKey: pageKeyArg, PageTitle: pageTitleArg, WikiId: wikiIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
ForumThreadId | Int32 | Related Forum Thread | Optional | ||
Id | Int32 | Either Id or WikiId and PageTitle should be specified. | Optional | ||
PageKey | String | Obsolete, Either Id or WikiId and PageTitle should be specified. | Optional | ||
PageTitle | String | Either Id or WikiId and PageTitle should be specified. | Optional | ||
WikiId | Int32 | Wiki Id | Optional |
Get Overload 2
Gets a Wiki Page
Velocity
#set($wikiPageResponse = $core_v2_wikiPage.Get($contentId))
JavaScript
var wikiPageResponse = core_v2_wikiPage.Get(contentId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required |
Returns
GetRating
Gets the rating. DEPRECATED: Use $core_v2_ratedItem.Get() instead.
Velocity
#set($ratingResponse = $core_v2_wikiPage.GetRating($id))
JavaScript
var ratingResponse = core_v2_wikiPage.GetRating(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Wiki Page Id | Required |
Returns
IncrementViewCount
Increments the view count on the wiki page
Velocity
$core_v2_wikiPage.IncrementViewCount($id)
JavaScript
core_v2_wikiPage.IncrementViewCount(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Wiki Page Id | Required |
Returns
NothingIsSubscribed
Returns subscribed status for the accessing user
Velocity
#set($booleanResponse = $core_v2_wikiPage.IsSubscribed($id))
JavaScript
var booleanResponse = core_v2_wikiPage.IsSubscribed(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Wiki Page Id | Required |
Returns
Boolean
List
Lists Wiki Pages
Velocity
#set($pagedListResponse = $core_v2_wikiPage.List($wikiId, "%{ AuthorId = $authorIdArg, ContentIds = $contentIdsArg, GroupId = $groupIdArg, IncludeSubGroupContent = $includeSubGroupContentArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, ParentPageId = $parentPageIdArg, QueryType = $queryTypeArg, ShowHiddenInTableOfContents = $showHiddenInTableOfContentsArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, Tags = $tagsArg }"))
JavaScript
var pagedListResponse = core_v2_wikiPage.List(wikiId, { AuthorId: authorIdArg, ContentIds: contentIdsArg, GroupId: groupIdArg, IncludeSubGroupContent: includeSubGroupContentArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, ParentPageId: parentPageIdArg, QueryType: queryTypeArg, ShowHiddenInTableOfContents: showHiddenInTableOfContentsArg, SortBy: sortByArg, SortOrder: sortOrderArg, Tags: tagsArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
wikiId | Int32 | Wiki Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
AuthorId | Int32 | Author Id | Optional | ||
ContentIds | String | Comma separated list of ContentIds. Used to limit to a specific set of wiki pages as well as sort order if SortBy is set to ContentIdsOrder | Optional | ||
GroupId | Int32 | Group Id | Optional | ||
IncludeSubGroupContent | Boolean | Include Sub Group Content | 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 | |
ParentPageId | Int32 | Parent Page Id | Optional | ||
QueryType | String | Query Type | Optional | All, AllByTags, New, Updated | |
ShowHiddenInTableOfContents | Boolean | When true the list will only show items with their HiddenInTableOfContents flag set to true. When false they are excluded. Not specifying a value will show both. | Optional | ||
SortBy | String | Sort By | Optional | Date | ContentIdsOrder, CreatedDate, Date, Score:SCORE_ID, Title |
SortOrder | String | Sort Order | Optional | Descending | Ascending, Descending |
Tags | String | Tags | Optional |
Returns
SetRating
Sets the rating for the accessing user. DEPRECATED: Use $core_v2_rating.Create() instead.
Velocity
$core_v2_wikiPage.SetRating($id, $rating)
JavaScript
core_v2_wikiPage.SetRating(id, rating);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Wiki Page Id | Required | ||
rating | Int32 | Rating value (0-5) | Required |
Returns
NothingSetSubscribed
Sets subscribed status for the accessing user
Velocity
#set($additionalInfoResponse = $core_v2_wikiPage.SetSubscribed($id, $subscribe))
JavaScript
var additionalInfoResponse = core_v2_wikiPage.SetSubscribed(id, subscribe);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Wiki Page Id | Required | ||
subscribe | Boolean | Subscribed Status | Required |
Returns
Update
Updates a Wiki Page
Velocity
#set($wikiPageResponse = $core_v2_wikiPage.Update($id, "%{ Body = $bodyArg, FeaturedImage = $featuredImageArg, ForumThreadId = $forumThreadIdArg, HideInTableOfContents = $hideInTableOfContentsArg, IsFeatured = $isFeaturedArg, IsLocked = $isLockedArg, IsPublished = $isPublishedArg, LastModifiedDate = $lastModifiedDateArg, MetaDescription = $metaDescriptionArg, MetaKeywords = $metaKeywordsArg, MetaTitle = $metaTitleArg, ParentPageId = $parentPageIdArg, Position = $positionArg, SaveRevision = $saveRevisionArg, Tags = $tagsArg, Title = $titleArg, UserId = $userIdArg }"))
JavaScript
var wikiPageResponse = core_v2_wikiPage.Update(id, { Body: bodyArg, FeaturedImage: featuredImageArg, ForumThreadId: forumThreadIdArg, HideInTableOfContents: hideInTableOfContentsArg, IsFeatured: isFeaturedArg, IsLocked: isLockedArg, IsPublished: isPublishedArg, LastModifiedDate: lastModifiedDateArg, MetaDescription: metaDescriptionArg, MetaKeywords: metaKeywordsArg, MetaTitle: metaTitleArg, ParentPageId: parentPageIdArg, Position: positionArg, SaveRevision: saveRevisionArg, Tags: tagsArg, Title: titleArg, UserId: userIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
Body | String | Body | Optional | ||
FeaturedImage | String | Used to include a featured image when IsFeatured is true. | Optional | ||
ForumThreadId | Int32 | Related Forum Thread | Optional | ||
HideInTableOfContents | Boolean | When true this page will not be listed in the table of contents. | Optional | ||
IsFeatured | Boolean | Is Featured | Optional | False | |
IsLocked | Boolean | Is Locked | Optional | False | |
IsPublished | Boolean | Is Published | Optional | True | |
LastModifiedDate | DateTime | Date the wiki page was last modified | Optional | DateTime.Now | |
MetaDescription | String | Description used in meta description tag. | Optional | ||
MetaKeywords | String | Keywords for the meta keyword tag. | Optional | ||
MetaTitle | String | Title used in page's title tag. | Optional | ||
ParentPageId | Int32 | Parent Page Id | Optional | ||
Position | Int32 | Position in the table of contents relative to the parent with the first child being 1 and then increasing sequentially. Only applies to listing the table of contents. | Optional | ||
SaveRevision | Boolean | Save Revision | Optional | True | |
Tags | String | A comma separated list of tags. | Optional | ||
Title | String | Title | Optional | ||
UserId | Int32 | Obsolete in 13.0. | Optional |