Exposes the article category api to widgets,themes and automation.
Properties
Name | Access | Type | Description |
---|---|---|---|
Current | Read | Category | Current |
Methods
Create
Create Overload 1
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
collectionId | Guid | Id of the collection where the category is to be created. | Required | ||
name | String | Name of the category. | Required |
Create Overload 2
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
collectionId | Guid | Id of the collection where the category is to be created. | Required | ||
name | String | Name of the category. | Required | ||
options | Options | Set of optional parameters including: | Required | ||
DefaultArticleId | Guid | Id of the article that is the default for the category. | Optional | ||
Description | String | A description of the article category and/or it's contents. | Optional | ||
ImageFileName | String | File Name. Required when updating featured item using FileUploadContext. Optional parameter | Optional | ||
ImageFileUploadContext | String | File Upload Context. When adding an image either FileData or FileUploadContext is required. Optional parameter | Optional | ||
ParentId | Int32 | The parent category of the category being created. | Optional | ||
SortOrder | Int32 | Used to determine the order in which the category is displayed alongside other categories. | Optional |
Returns
Delete
Delete Overload 1
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
Id | Int32 | Id of the category to be deleted. | Required |
Delete Overload 2
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
Id | Int32 | Id of the category to be deleted. | Required | ||
options | Options | Set of optional parameters including: | Required | ||
ReassignToCategoryId | Int32 | The category id to assign the articles and child categories to after deletion. | Optional |
Returns
Get
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
ArticleCollectionId | Guid | Used when passing a UrlKey. ArticleCollectionId and UrlKey are used to find the specific category. | Optional | ||
Id | Int32 | Id of the category to return. When passed, ArticleCollectionId, and UrlKey are ignored. | Optional | ||
UrlKey | String | Used when passing an ArticleCollectionId. ArticleCollectionId and UrlKey are used to find the specific category. | Optional |
Returns
List
List Overload 1
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
collectionId | Guid | Id of the collection to filter categories by | Required |
List Overload 2
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
collectionId | Guid | Id of the collection to filter categories by | Required | ||
options | Options | Set of optional parameters including: | Required | ||
ArticleId | Guid | Id of the article. Filter categores to a specific article. | Optional | ||
CategoryOrChildrenHaveArticles | Boolean | Only returns categories that have published articles, or direct children have published articles. Cannot be used if filtering by ArticleId. | Optional | ||
DefaultArticleId | Guid | Id of the article. Filter categories to ones that use the provided article as their default. | Optional | ||
IsDeleted | Boolean | Filters categories that have been deleted. | Optional | ||
ParentId | Int32 | Id of the parent category to filter by. | Optional | ||
RootLevelOnly | Boolean | Only returns the root level categories. When true, parent id is ignored. | Optional |
Returns
Lookup
Lookup Overload 1
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
query | String | Query | Required |
Lookup Overload 2
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
query | String | Query | Required | ||
options | Options | Set of optional parameters including: | Required | ||
ArticleCollectionId | Guid | The ID of the ArticleCollection to search for articles. When not specified, categories can only be found by ID or URL. | Optional |
Returns
Undelete
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
Id | Int32 | Id of the category to undelete. | Required |
Returns
Update
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
Id | Int32 | Id of the category to be updated. | Required | ||
options | Options | Set of optional parameters including: | Required | ||
DefaultArticleId | Guid | Id of the article that is the default for the category. | Optional | ||
Description | String | A description of the article category and/or it's contents. | Optional | ||
ImageFileName | String | File Name. Required when updating featured item using FileUploadContext. Optional parameter | Optional | ||
ImageFileUploadContext | String | File Upload Context. When adding an image either FileData or FileUploadContext is required. Optional parameter | Optional | ||
Name | String | Name of the category. | Optional | ||
ParentId | Int32 | The parent category of the category being updated. | Optional | ||
RemoveDefaultArticleId | Boolean | Allows removing a categories default article. | Optional | ||
RemoveImage | Boolean | Allows removing a categories image. | Optional | ||
RemoveParentId | Boolean | Allows removing a categories parent, moving the category to the root level. | Optional | ||
RemoveSortOrder | Boolean | Allows resetting a categories sort order. | Optional | ||
SortOrder | Int32 | Used to determine the order in which the category is displayed alongside other categories. | Optional |