Enables scripted content fragments to use Content Views
Methods
GetViewCount
Get the total number of views of a piece of content
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | ID of the content being viewed | Required | ||
contentTypeId | Guid | Content Type ID of the content being viewed | Required | ||
options | Options | Set of optional parameters including: | Required | ||
ViewTypeId | Guid | ID representing type of view | Optional |
Returns
IncrementViewCount
IncrementViewCount Overload 1
Create a record of a piece of content being viewed. DEPRECATED in v12: Instead use the method signature that includes an options parameter.
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | ID of the content being viewed | Required | ||
contentTypeId | Guid | Content Type ID of the content being viewed | Required | ||
viewTypeId | Guid | ID representing type of view | Required |
IncrementViewCount Overload 2
Create a record of a piece of content being viewed
Velocity
JavaScript
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | ID of the content being viewed | Required | ||
contentTypeId | Guid | Content Type ID of the content being viewed | Required | ||
options | Options | Set of optional parameters including: | Required | ||
ViewTypeId | Guid | The view type id of the content view. As of 12.1 the default value is '00000000-0000-0000-0000-000000000000'. If passing in a legacy value, the return value will contain a ViewTypeId value of '00000000-0000-0000-0000-000000000000'. | Optional |