Enables scripted content fragments to render standardized UI elements.
- Properties
- AgoDate
- Bookmark
- CanBeViewed
- CanFormatHtmlAsText
- ConvertContent
- Feature
- FormatHtmlAsText
- FormatTextAsHtml
- ForumVotes
- GetCurrentPageIndex
- GetFileTypeImageUrl
- GetLastPageIndex
- GetMediaType
- GetMimeType
- GetPreviewHtml
- GetPreviewImageUrl
- GetResizedImageHtml
- GetResizedImageUrl
- GetViewHtml
- Like
- MakeCssClassName
- Merge
- Moderate
- PagedContent
- PagedContentPagedEvent
- PagedContentPagingEvent
- PagedContentWrapperElementId
- Pager
- Poll
- Rate
- Render
- ScheduledFile
- Tag
- UserPresence
Properties
Name | Access | Type | Description |
---|---|---|---|
PageIndexQueryStringKey | Read | String | Unique widget-instance-specific key used to identify requested page indexes in the query string |
Methods
AgoDate
AgoDate Overload 1
Renders an auto-updating ago date.
Velocity
#set($stringResponse = $core_v2_ui.AgoDate($date))
JavaScript
var stringResponse = core_v2_ui.AgoDate(date);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
date | DateTime | Date | Required |
AgoDate Overload 2
Renders an auto-updating ago date.
Velocity
#set($stringResponse = $core_v2_ui.AgoDate($date, "%{ CssClass = $cssClassArg }"))
JavaScript
var stringResponse = core_v2_ui.AgoDate(date, { CssClass: cssClassArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
date | DateTime | Date | Required | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional |
Returns
String
Bookmark
Bookmark Overload 1
Renders the ability to add/remove a bookmark for this content.
Velocity
#set($stringResponse = $core_v2_ui.Bookmark($contentId, $contentTypeId))
JavaScript
var stringResponse = core_v2_ui.Bookmark(contentId, contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
Bookmark Overload 2
Renders the ability to add/remove a bookmark for this content. Additional un-specified optional parameters are combined into a single query-string encoded data attribute on the resulting placeholder span.
Velocity
#set($stringResponse = $core_v2_ui.Bookmark($contentId, $contentTypeId, "%{ BookmarkTypeId = $bookmarkTypeIdArg, CssClass = $cssClassArg }"))
JavaScript
var stringResponse = core_v2_ui.Bookmark(contentId, contentTypeId, { BookmarkTypeId: bookmarkTypeIdArg, CssClass: cssClassArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
BookmarkTypeId | Guid | Bookmark Type Id | Optional | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional |
Bookmark Overload 3
Renders the ability to add/remove a bookmark for this content.
Velocity
#set($stringResponse = $core_v2_ui.Bookmark($contentUrl, $oauthClientId))
JavaScript
var stringResponse = core_v2_ui.Bookmark(contentUrl, oauthClientId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required |
Bookmark Overload 4
Renders the ability to add/remove a bookmark for this content. Additional un-specified optional parameters are combined into a single query-string encoded data attribute on the resulting placeholder span.
Velocity
#set($stringResponse = $core_v2_ui.Bookmark($contentUrl, $oauthClientId, "%{ BookmarkTypeId = $bookmarkTypeIdArg, CssClass = $cssClassArg }"))
JavaScript
var stringResponse = core_v2_ui.Bookmark(contentUrl, oauthClientId, { BookmarkTypeId: bookmarkTypeIdArg, CssClass: cssClassArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required | ||
BookmarkTypeId | Guid | Bookmark Type Id | Optional | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional |
Returns
String
CanBeViewed
Determines whether a file can be viewed
Velocity
#set($booleanResponse = $core_v2_ui.CanBeViewed($url))
JavaScript
var booleanResponse = core_v2_ui.CanBeViewed(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
Returns
Boolean
CanFormatHtmlAsText
Identifies if HTML can be converted to text without data loss.
Velocity
#set($booleanResponse = $core_v2_ui.CanFormatHtmlAsText($html))
JavaScript
var booleanResponse = core_v2_ui.CanFormatHtmlAsText(html);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
html | String | Html | Required |
Returns
Boolean
ConvertContent
ConvertContent Overload 1
Renders a link to initiate a content conversion session
Velocity
#set($stringResponse = $core_v2_ui.ConvertContent($contentId, $contentTypeId))
JavaScript
var stringResponse = core_v2_ui.ConvertContent(contentId, contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
ConvertContent Overload 2
Renders a link to initiate a content conversion session
Velocity
#set($stringResponse = $core_v2_ui.ConvertContent($contentId, $contentTypeId, "%{ }"))
JavaScript
var stringResponse = core_v2_ui.ConvertContent(contentId, contentTypeId, { });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
Returns
String
Feature
Feature Overload 1
Renders the ability to add/remove a feature for this content.
Velocity
#set($stringResponse = $core_v2_ui.Feature($contentId, $contentTypeId))
JavaScript
var stringResponse = core_v2_ui.Feature(contentId, contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
Feature Overload 2
Renders the ability to add/remove a feature for this content. Additional un-specified optional parameters are combined into a single query-string encoded data attribute on the resulting placeholder span.
Velocity
#set($stringResponse = $core_v2_ui.Feature($contentId, $contentTypeId, "%{ CssClass = $cssClassArg, TypeId = $typeIdArg }"))
JavaScript
var stringResponse = core_v2_ui.Feature(contentId, contentTypeId, { CssClass: cssClassArg, TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional | ||
TypeId | Guid | Feature Type Id | Optional |
Feature Overload 3
Renders the ability to add/remove a feature for this content.
Velocity
#set($stringResponse = $core_v2_ui.Feature($contentUrl, $oauthClientId))
JavaScript
var stringResponse = core_v2_ui.Feature(contentUrl, oauthClientId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required |
Feature Overload 4
Renders the ability to add/remove a feature for this content. Additional un-specified optional parameters are combined into a single query-string encoded data attribute on the resulting placeholder span.
Velocity
#set($stringResponse = $core_v2_ui.Feature($contentUrl, $oauthClientId, "%{ CssClass = $cssClassArg, TypeId = $typeIdArg }"))
JavaScript
var stringResponse = core_v2_ui.Feature(contentUrl, oauthClientId, { CssClass: cssClassArg, TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional | ||
TypeId | Guid | Feature Type Id | Optional |
Returns
String
FormatHtmlAsText
Formats HTML as text
Velocity
#set($stringResponse = $core_v2_ui.FormatHtmlAsText($html))
JavaScript
var stringResponse = core_v2_ui.FormatHtmlAsText(html);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
html | String | Html | Required |
Returns
String
FormatTextAsHtml
FormatTextAsHtml Overload 1
Formats text as HTML
Velocity
#set($stringResponse = $core_v2_ui.FormatTextAsHtml($text))
JavaScript
var stringResponse = core_v2_ui.FormatTextAsHtml(text);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
text | String | Text | Required |
FormatTextAsHtml Overload 2
Formats text as HTML
Velocity
#set($stringResponse = $core_v2_ui.FormatTextAsHtml($text, "%{ ConvertToParagraphs = $convertToParagraphsArg, DetectMediaUrls = $detectMediaUrlsArg }"))
JavaScript
var stringResponse = core_v2_ui.FormatTextAsHtml(text, { ConvertToParagraphs: convertToParagraphsArg, DetectMediaUrls: detectMediaUrlsArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
text | String | Text | Required | ||
ConvertToParagraphs | Boolean | Convert To Paragraphs | Optional | True | |
DetectMediaUrls | Boolean | Detect Media Urls | Optional | False |
Returns
String
ForumVotes
ForumVotes Overload 1
Velocity
#set($stringResponse = $core_v2_ui.ForumVotes($type, $id))
JavaScript
var stringResponse = core_v2_ui.ForumVotes(type, id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
type | String | Type | Required | ||
id | Int32 | Id | Required |
ForumVotes Overload 2
Velocity
#set($stringResponse = $core_v2_ui.ForumVotes($type, $id, "%{ }"))
JavaScript
var stringResponse = core_v2_ui.ForumVotes(type, id, { });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
type | String | Type | Required | ||
id | Int32 | Id | Required |
Returns
String
GetCurrentPageIndex
GetCurrentPageIndex Overload 1
Returns the currently-requested paging index
Velocity
#set($int32Response = $core_v2_ui.GetCurrentPageIndex())
JavaScript
var int32Response = core_v2_ui.GetCurrentPageIndex();
GetCurrentPageIndex Overload 2
Returns the currently-requested paging index
Velocity
#set($int32Response = $core_v2_ui.GetCurrentPageIndex("%{ QueryStringProperty = $queryStringPropertyArg }"))
JavaScript
var int32Response = core_v2_ui.GetCurrentPageIndex({ QueryStringProperty: queryStringPropertyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
QueryStringProperty | String | Query string page index key | Optional | Value of PageIndexQueryStringKey |
Returns
Int32
GetFileTypeImageUrl
GetFileTypeImageUrl Overload 1
Gets a file type image URL for a URL or filename
Velocity
#set($stringResponse = $core_v2_ui.GetFileTypeImageUrl($url, "%{ Height = $heightArg, OutputIsPersisted = $outputIsPersistedArg, Width = $widthArg }"))
JavaScript
var stringResponse = core_v2_ui.GetFileTypeImageUrl(url, { Height: heightArg, OutputIsPersisted: outputIsPersistedArg, Width: widthArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required | ||
Height | Int32 | Height | Optional | ||
OutputIsPersisted | Boolean | When the output is not persisted, direct links to CFS file URLs can be rendered. Otherwise, the generic CFS URL is rendered which results in a redirect. | Optional | False | |
Width | Int32 | Width | Optional |
GetFileTypeImageUrl Overload 2
Gets a file type image URL for a URL or filename
Velocity
#set($stringResponse = $core_v2_ui.GetFileTypeImageUrl($url))
JavaScript
var stringResponse = core_v2_ui.GetFileTypeImageUrl(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
Returns
String
GetLastPageIndex
Gets the last page index
Velocity
#set($int32Response = $core_v2_ui.GetLastPageIndex($pageSize, $totalItems))
JavaScript
var int32Response = core_v2_ui.GetLastPageIndex(pageSize, totalItems);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
pageSize | Int32 | Page Size | Required | ||
totalItems | Int32 | Total Items | Required |
Returns
Int32
GetMediaType
GetMediaType Overload 1
Gets media type of a file
Velocity
#set($stringResponse = $core_v2_ui.GetMediaType($url))
JavaScript
var stringResponse = core_v2_ui.GetMediaType(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
GetMediaType Overload 2
Gets media type of a file
Velocity
#set($stringResponse = $core_v2_ui.GetMediaType($url, "%{ OutputIsPersisted = $outputIsPersistedArg, ViewType = $viewTypeArg }"))
JavaScript
var stringResponse = core_v2_ui.GetMediaType(url, { OutputIsPersisted: outputIsPersistedArg, ViewType: viewTypeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required | ||
OutputIsPersisted | Boolean | When the output is not persisted, direct links to CFS file URLs can be rendered. Otherwise, the generic CFS URL is rendered which results in a redirect. | Optional | False | |
ViewType | String | View Type | Optional | View | Preview, View |
Returns
String
GetMimeType
Returns the Mime Type of a file
Velocity
#set($stringResponse = $core_v2_ui.GetMimeType($url))
JavaScript
var stringResponse = core_v2_ui.GetMimeType(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
Returns
String
GetPreviewHtml
GetPreviewHtml Overload 1
Renders preview HtML for a file
Velocity
#set($stringResponse = $core_v2_ui.GetPreviewHtml($url))
JavaScript
var stringResponse = core_v2_ui.GetPreviewHtml(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
GetPreviewHtml Overload 2
Renders preview HtML for a file
Velocity
#set($stringResponse = $core_v2_ui.GetPreviewHtml($url, "%{ AdjustToContainer = $adjustToContainerArg, Height = $heightArg, OutputIsPersisted = $outputIsPersistedArg, Width = $widthArg }"))
JavaScript
var stringResponse = core_v2_ui.GetPreviewHtml(url, { AdjustToContainer: adjustToContainerArg, Height: heightArg, OutputIsPersisted: outputIsPersistedArg, Width: widthArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required | ||
AdjustToContainer | Boolean | When true, the HTML is re-rendered on window resize to fit within the max available space in the parent container. | Optional | False | |
Height | Int32 | Height | Optional | ||
OutputIsPersisted | Boolean | When the output is not persisted, direct links to CFS file URLs can be rendered. Otherwise, the generic CFS URL is rendered which results in a redirect. | Optional | False | |
Width | Int32 | Width | Optional |
Returns
String
GetPreviewImageUrl
Returns a URL of an image that can be used as a preview of file represented by the provided URL
Velocity
#set($stringResponse = $core_v2_ui.GetPreviewImageUrl($url))
JavaScript
var stringResponse = core_v2_ui.GetPreviewImageUrl(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
Returns
String
GetResizedImageHtml
Renders an image as HTML configured to be resized to the given maximum width and height. Unrecognized name/value pairs passed into the dictionary parameter are rendered on the ouput IMG tag.
Velocity
#set($stringResponse = $core_v2_ui.GetResizedImageHtml($url, $maxWidth, $maxHeight, "%{ OutputIsPersisted = $outputIsPersistedArg, ResizeMethod = $resizeMethodArg, ScaleFactor = $scaleFactorArg }"))
JavaScript
var stringResponse = core_v2_ui.GetResizedImageHtml(url, maxWidth, maxHeight, { OutputIsPersisted: outputIsPersistedArg, ResizeMethod: resizeMethodArg, ScaleFactor: scaleFactorArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required | ||
maxWidth | Int32 | Max Width | Required | ||
maxHeight | Int32 | Max Height | Required | ||
OutputIsPersisted | Boolean | When the output is not persisted, direct links to CFS file URLs can be rendered. Otherwise, the generic CFS URL is rendered which results in a redirect. | Optional | False | |
ResizeMethod | String | Resize Method | Optional | ScaleDown, ZoomAndCrop | |
ScaleFactor | Double | Scale factor to use for high-DPI output | Optional | 1 |
Returns
String
GetResizedImageUrl
Returns the URL of the provided image resized to the given maximum width and height if the file can be physically resized. If not, the original URL is returned.
Velocity
#set($stringResponse = $core_v2_ui.GetResizedImageUrl($url, $maxWidth, $maxHeight, "%{ OutputIsPersisted = $outputIsPersistedArg, ResizeMethod = $resizeMethodArg, ScaleFactor = $scaleFactorArg }"))
JavaScript
var stringResponse = core_v2_ui.GetResizedImageUrl(url, maxWidth, maxHeight, { OutputIsPersisted: outputIsPersistedArg, ResizeMethod: resizeMethodArg, ScaleFactor: scaleFactorArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required | ||
maxWidth | Int32 | Max Width | Required | ||
maxHeight | Int32 | Max Height | Required | ||
OutputIsPersisted | Boolean | When the output is not persisted, direct links to CFS file URLs can be rendered. Otherwise, the generic CFS URL is rendered which results in a redirect. | Optional | False | |
ResizeMethod | String | Resize Method | Optional | ScaleDown, ZoomAndCrop | |
ScaleFactor | Double | Scale factor to use for high-DPI output | Optional | 1 |
Returns
String
GetViewHtml
GetViewHtml Overload 1
Renders View HTML for a file
Velocity
#set($stringResponse = $core_v2_ui.GetViewHtml($url))
JavaScript
var stringResponse = core_v2_ui.GetViewHtml(url);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required |
GetViewHtml Overload 2
Renders View HTML for a file
Velocity
#set($stringResponse = $core_v2_ui.GetViewHtml($url, "%{ AdjustToContainer = $adjustToContainerArg, Height = $heightArg, OutputIsPersisted = $outputIsPersistedArg, Width = $widthArg }"))
JavaScript
var stringResponse = core_v2_ui.GetViewHtml(url, { AdjustToContainer: adjustToContainerArg, Height: heightArg, OutputIsPersisted: outputIsPersistedArg, Width: widthArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
url | String | Url | Required | ||
AdjustToContainer | Boolean | When true, the HTML is re-rendered on window resize to fit within the max available space in the parent container. | Optional | False | |
Height | Int32 | Height | Optional | ||
OutputIsPersisted | Boolean | When the output is not persisted, direct links to CFS file URLs can be rendered. Otherwise, the generic CFS URL is rendered which results in a redirect. | Optional | False | |
Width | Int32 | Width | Optional |
Returns
String
Like
Like Overload 1
Renders a 'Like' count for a given content item
Velocity
#set($stringResponse = $core_v2_ui.Like($contentId, $contentTypeId))
JavaScript
var stringResponse = core_v2_ui.Like(contentId, contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
Like Overload 2
Renders a 'Like' count, toggle, and/or message for a given content item. Additional un-specified optional parameters are combined into a single query-string encoded data attribute on the resulting placeholder span.
Velocity
#set($stringResponse = $core_v2_ui.Like($contentId, $contentTypeId, "%{ CssClass = $cssClassArg, Format = $formatArg, LikeTypeId = $likeTypeIdArg, ReadOnly = $readOnlyArg }"))
JavaScript
var stringResponse = core_v2_ui.Like(contentId, contentTypeId, { CssClass: cssClassArg, Format: formatArg, LikeTypeId: likeTypeIdArg, ReadOnly: readOnlyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional | ||
Format | String | Templated string containing tokens identifying if, and where, the Like control should contain a count, toggle link, and 'who likes' message | Optional | {count} | {count}, {message}, {toggle} |
LikeTypeId | Guid | Like Type Id | Optional | ||
ReadOnly | Boolean | Render the like UI as read-only | Optional |
Like Overload 3
Renders a 'Like' count for a given content item
Velocity
#set($stringResponse = $core_v2_ui.Like($contentUrl, $oauthClientId))
JavaScript
var stringResponse = core_v2_ui.Like(contentUrl, oauthClientId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required |
Like Overload 4
Renders a 'Like' count, toggle, and/or message for a given content item. Additional un-specified optional parameters are combined into a single query-string encoded data attribute on the resulting placeholder span.
Velocity
#set($stringResponse = $core_v2_ui.Like($contentUrl, $oauthClientId, "%{ CssClass = $cssClassArg, Format = $formatArg, IncludeTip = $includeTipArg, LikeTypeId = $likeTypeIdArg, ReadOnly = $readOnlyArg }"))
JavaScript
var stringResponse = core_v2_ui.Like(contentUrl, oauthClientId, { CssClass: cssClassArg, Format: formatArg, IncludeTip: includeTipArg, LikeTypeId: likeTypeIdArg, ReadOnly: readOnlyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional | ||
Format | String | Templated string containing tokens identifying if, and where, the Like control should contain a count, toggle link, and 'who likes' message | Optional | {count} | {count}, {message}, {toggle} |
IncludeTip | Boolean | Include the like message as a tip | Optional | false | |
LikeTypeId | Guid | Like Type Id | Optional | ||
ReadOnly | Boolean | Render the like UI as read-only | Optional |
Returns
String
MakeCssClassName
Converts a pascal or camel-cased string to hyphen-cased
Velocity
#set($stringResponse = $core_v2_ui.MakeCssClassName($text))
JavaScript
var stringResponse = core_v2_ui.MakeCssClassName(text);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
text | String | Text | Required |
Returns
String
Merge
Produces a diff text
Velocity
#set($stringResponse = $core_v2_ui.Merge($original, $modified))
JavaScript
var stringResponse = core_v2_ui.Merge(original, modified);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
original | String | Original | Required | ||
modified | String | Modified | Required |
Returns
String
Moderate
Moderate Overload 1
Render's a 'Moderation' control
Velocity
#set($stringResponse = $core_v2_ui.Moderate($contentId, $contentTypeId))
JavaScript
var stringResponse = core_v2_ui.Moderate(contentId, contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
Moderate Overload 2
Render's a 'Moderation' control
Velocity
#set($stringResponse = $core_v2_ui.Moderate($contentId, $contentTypeId, "%{ AdditionalLinks = $additionalLinksArg, AdditionalLinksUrl = $additionalLinksUrlArg, CssClass = $cssClassArg }"))
JavaScript
var stringResponse = core_v2_ui.Moderate(contentId, contentTypeId, { AdditionalLinks: additionalLinksArg, AdditionalLinksUrl: additionalLinksUrlArg, CssClass: cssClassArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
AdditionalLinks | String | Predefined additional Links to render before the moderation link in JSON format: [ { href: '', text: '', className: ''} ] (either AdditionalLinks or AdditionalLinksUrl may be used) | Optional | ||
AdditionalLinksUrl | String | JSON endpoint URL which returns additional Links to render before the moderation link in JSON format: [ { href: '', text: '', className: ''} ] (either AdditionalLinks or AdditionalLinksUrl may be used) | Optional | ||
CssClass | String | Css Class | Optional |
Returns
String
PagedContent
PagedContent Overload 1
Executes a file with support for it to be updated via ajax paging. Required corresponding use of the 'PagedContentFile' parameter in $core_v2_ui.Pager()
Velocity
#set($stringResponse = $core_v2_ui.PagedContent($contentFileName))
JavaScript
var stringResponse = core_v2_ui.PagedContent(contentFileName);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentFileName | String | Name of attached widget script file to execute which generates a page of content | Required |
PagedContent Overload 2
Executes a file with support for it to be updated via ajax paging. Required corresponding use of the 'PagedContentFile' parameter in $core_v2_ui.Pager()
Velocity
#set($stringResponse = $core_v2_ui.PagedContent($contentFileName, "%{ CssClass = $cssClassArg, ElementType = $elementTypeArg, QueryStringProperty = $queryStringPropertyArg }"))
JavaScript
var stringResponse = core_v2_ui.PagedContent(contentFileName, { CssClass: cssClassArg, ElementType: elementTypeArg, QueryStringProperty: queryStringPropertyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentFileName | String | Name of attached widget script file to execute which generates a page of content | Required | ||
CssClass | String | CSS Class(es) to apply to the paged content's wrapper element | Optional | ||
ElementType | String | Type of DOM element to use for the paged content's wrapper | Optional | div | |
QueryStringProperty | String | Query String Property to use instead of the default PageIndexQueryStringKey to disambiguate when multiple pagers are used within a single widget | Optional |
Returns
String
PagedContentPagedEvent
PagedContentPagedEvent Overload 1
Name of client-side message published after a widget's content has been paged via ajax
Velocity
#set($stringResponse = $core_v2_ui.PagedContentPagedEvent())
JavaScript
var stringResponse = core_v2_ui.PagedContentPagedEvent();
PagedContentPagedEvent Overload 2
Name of client-side message published after a widget's content has been paged via ajax
Velocity
#set($stringResponse = $core_v2_ui.PagedContentPagedEvent("%{ QueryStringProperty = $queryStringPropertyArg }"))
JavaScript
var stringResponse = core_v2_ui.PagedContentPagedEvent({ QueryStringProperty: queryStringPropertyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
QueryStringProperty | String | Query String Property to use instead of the default PageIndexQueryStringKey to disambiguate when multiple pagers are used within a single widget | Optional |
Returns
String
PagedContentPagingEvent
PagedContentPagingEvent Overload 1
Name of client-side message published upon the initiation of a widget's ajax paging
Velocity
#set($stringResponse = $core_v2_ui.PagedContentPagingEvent())
JavaScript
var stringResponse = core_v2_ui.PagedContentPagingEvent();
PagedContentPagingEvent Overload 2
Name of client-side message published upon the initiation of a widget's ajax paging
Velocity
#set($stringResponse = $core_v2_ui.PagedContentPagingEvent("%{ QueryStringProperty = $queryStringPropertyArg }"))
JavaScript
var stringResponse = core_v2_ui.PagedContentPagingEvent({ QueryStringProperty: queryStringPropertyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
QueryStringProperty | String | Query String Property to use instead of the default PageIndexQueryStringKey to disambiguate when multiple pagers are used within a single widget | Optional |
Returns
String
PagedContentWrapperElementId
PagedContentWrapperElementId Overload 1
Container ID for a widget's Paged Content
Velocity
#set($stringResponse = $core_v2_ui.PagedContentWrapperElementId())
JavaScript
var stringResponse = core_v2_ui.PagedContentWrapperElementId();
PagedContentWrapperElementId Overload 2
Container ID for a widget's Paged Content
Velocity
#set($stringResponse = $core_v2_ui.PagedContentWrapperElementId("%{ QueryStringProperty = $queryStringPropertyArg }"))
JavaScript
var stringResponse = core_v2_ui.PagedContentWrapperElementId({ QueryStringProperty: queryStringPropertyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
QueryStringProperty | String | Query String Property to use instead of the default PageIndexQueryStringKey to disambiguate when multiple pagers are used within a single widget | Optional |
Returns
String
Pager
Pager Overload 1
Renders a 'Pager' control
Velocity
#set($stringResponse = $core_v2_ui.Pager($currentPage, $pageSize, $totalItems))
JavaScript
var stringResponse = core_v2_ui.Pager(currentPage, pageSize, totalItems);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
currentPage | Int32 | Current Page | Required | ||
pageSize | Int32 | Page Size | Required | ||
totalItems | Int32 | Total Items | Required |
Pager Overload 2
Renders a 'Pager' control
Velocity
#set($stringResponse = $core_v2_ui.Pager($currentPage, $pageSize, $totalItems, "%{ BaseUrl = $baseUrlArg, CssClass = $cssClassArg, LoadingIndicator = $loadingIndicatorArg, LoadOnAnyHashChange = $loadOnAnyHashChangeArg, NumberOfPagesToDisplay = $numberOfPagesToDisplayArg, PagedContentFile = $pagedContentFileArg, PagedContentUrl = $pagedContentUrlArg, QueryStringProperty = $queryStringPropertyArg, ShowFirst = $showFirstArg, ShowIndividualPages = $showIndividualPagesArg, ShowLast = $showLastArg, ShowNext = $showNextArg, ShowPrevious = $showPreviousArg, Target = $targetArg, Template = $templateArg, Transition = $transitionArg, TransitionDuration = $transitionDurationArg }"))
JavaScript
var stringResponse = core_v2_ui.Pager(currentPage, pageSize, totalItems, { BaseUrl: baseUrlArg, CssClass: cssClassArg, LoadingIndicator: loadingIndicatorArg, LoadOnAnyHashChange: loadOnAnyHashChangeArg, NumberOfPagesToDisplay: numberOfPagesToDisplayArg, PagedContentFile: pagedContentFileArg, PagedContentUrl: pagedContentUrlArg, QueryStringProperty: queryStringPropertyArg, ShowFirst: showFirstArg, ShowIndividualPages: showIndividualPagesArg, ShowLast: showLastArg, ShowNext: showNextArg, ShowPrevious: showPreviousArg, Target: targetArg, Template: templateArg, Transition: transitionArg, TransitionDuration: transitionDurationArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
currentPage | Int32 | Current Page | Required | ||
pageSize | Int32 | Page Size | Required | ||
totalItems | Int32 | Total Items | Required | ||
BaseUrl | String | URL to apply paging | Optional | Current Page | |
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional | ||
LoadingIndicator | Boolean | When true, displays a loading indicator | Optional | false | |
LoadOnAnyHashChange | Boolean | When true, loads a new page on any change of the hash, not just the page key | Optional | false | |
NumberOfPagesToDisplay | Int32 | Number of pages to display when showing individual pages | Optional | 5 | |
PagedContentFile | String | When provided enables Ajax paging against the content file. Requires corresponding use of $core_v2_ui.PagedContent(). Either this or PagedContentUrl can be used. | Optional | ||
PagedContentUrl | String | When provided enables Ajax paging against the content file. Either this or PagedContentFile with $core_v2_ui.PagedContent() can be used. | Optional | ||
QueryStringProperty | String | Name of the key to use for this widget's page index. Typically unnecessary to override | Optional | Auto-generated | |
ShowFirst | Boolean | When true, shows a link to the first page | Optional | True | |
ShowIndividualPages | Boolean | When true, shows individual links to pages | Optional | True | |
ShowLast | Boolean | When true, shows a link to the last page | Optional | True | |
ShowNext | Boolean | When true, shows a link to the next page | Optional | False | |
ShowPrevious | Boolean | When true, shows a link to the previous page | Optional | False | |
Target | String | Explicit hash target for page links | Optional | ||
Template | String | Template source code or id of template to use when rendering pager links | Optional | Platform-defined. Theme (and widget) overridable | |
Transition | String | Transition to use when merging ajax-paged results | Optional | slide | fade, none, slide |
TransitionDuration | Int32 | Duration of transition to use when merging ajax-paged results | Optional | 200 |
Returns
String
Poll
Poll Overload 1
Renders a poll.
Velocity
#set($stringResponse = $core_v2_ui.Poll($pollId))
JavaScript
var stringResponse = core_v2_ui.Poll(pollId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
pollId | Guid | Poll Id | Required |
Poll Overload 2
Renders a poll. Additional un-specified optional parameters are combined into a single query-string encoded data attribute on the resulting placeholder div.
Velocity
#set($stringResponse = $core_v2_ui.Poll($pollId, "%{ }"))
JavaScript
var stringResponse = core_v2_ui.Poll(pollId, { });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
pollId | Guid | Poll Id | Required |
Returns
String
Rate
Rate Overload 1
Renders a 'Rating' control
Velocity
#set($stringResponse = $core_v2_ui.Rate($contentId, $contentTypeId))
JavaScript
var stringResponse = core_v2_ui.Rate(contentId, contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
Rate Overload 2
Renders a 'Rating' control
Velocity
#set($stringResponse = $core_v2_ui.Rate($contentId, $contentTypeId, "%{ CssClass = $cssClassArg, RatingTypeId = $ratingTypeIdArg, ReadOnly = $readOnlyArg }"))
JavaScript
var stringResponse = core_v2_ui.Rate(contentId, contentTypeId, { CssClass: cssClassArg, RatingTypeId: ratingTypeIdArg, ReadOnly: readOnlyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional | ||
RatingTypeId | Guid | Rating TypeId | Optional | ||
ReadOnly | Boolean | Render the rating UI as read-only | Optional |
Rate Overload 3
Renders a 'Rating' control
Velocity
#set($stringResponse = $core_v2_ui.Rate($contentUrl, $oauthClientId))
JavaScript
var stringResponse = core_v2_ui.Rate(contentUrl, oauthClientId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required |
Rate Overload 4
Renders a 'Rating' control
Velocity
#set($stringResponse = $core_v2_ui.Rate($contentUrl, $oauthClientId, "%{ CssClass = $cssClassArg, RatingTypeId = $ratingTypeIdArg, ReadOnly = $readOnlyArg }"))
JavaScript
var stringResponse = core_v2_ui.Rate(contentUrl, oauthClientId, { CssClass: cssClassArg, RatingTypeId: ratingTypeIdArg, ReadOnly: readOnlyArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional | ||
RatingTypeId | Guid | Rating TypeId | Optional | ||
ReadOnly | Boolean | Render the rating UI as read-only | Optional |
Returns
String
Render
Render Overload 1
Sanitizes untrusted HTML content, formtted for the Web
Velocity
#set($stringResponse = $core_v2_ui.Render($html))
JavaScript
var stringResponse = core_v2_ui.Render(html);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
html | String | Html | Required |
Render Overload 2
Sanitizes untrusted HTML content
Velocity
#set($stringResponse = $core_v2_ui.Render($html, $target))
JavaScript
var stringResponse = core_v2_ui.Render(html, target);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
html | String | Html | Required | ||
target | String | Target | Required | Web | Email, MailGateway, Nntp, Offline, Other, Print, Syndication, Web, WebQuote, WebServices |
Returns
String
ScheduledFile
ScheduledFile Overload 1
Renders a live-updating progress indicator for a script executed with core_v2_widget.ScheduleFile() and a 'ProgressKey' identifier. Progress is reported by the script with the 'context_v2_scheduledFile' API.
Velocity
#set($stringResponse = $core_v2_ui.ScheduledFile($progressKey))
JavaScript
var stringResponse = core_v2_ui.ScheduledFile(progressKey);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
progressKey | String | Identifier matching the 'ProgressKey' passed to core_v2_widget.ScheduleFile() | Required |
ScheduledFile Overload 2
Renders a live-updating progress indicator for a script executed with core_v2_widget.ScheduleFile() and a 'ProgressKey' identifier. Progress is reported by the script with the 'context_v2_scheduledFile' API.
Velocity
#set($stringResponse = $core_v2_ui.ScheduledFile($progressKey, "%{ IncludeAllMessages = $includeAllMessagesArg, IncludeLatestMessage = $includeLatestMessageArg, IncludeProgress = $includeProgressArg }"))
JavaScript
var stringResponse = core_v2_ui.ScheduledFile(progressKey, { IncludeAllMessages: includeAllMessagesArg, IncludeLatestMessage: includeLatestMessageArg, IncludeProgress: includeProgressArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
progressKey | String | Identifier matching the 'ProgressKey' passed to core_v2_widget.ScheduleFile() | Required | ||
IncludeAllMessages | Boolean | Includes a log of all messages reported by the script with context_v2_scheduledFile.Report() | Optional | False | |
IncludeLatestMessage | Boolean | Includes only the latest message reported by the script with context_v2_scheduledFile.Report() | Optional | True | |
IncludeProgress | Boolean | Includes a progress bar displaying completion percentage reported by the script with context_v2_scheduledFile.Report() | Optional | True |
Returns
String
Tag
Tag Overload 1
Render's a 'Tag' control
Velocity
#set($stringResponse = $core_v2_ui.Tag($contentId, $contentTypeId))
JavaScript
var stringResponse = core_v2_ui.Tag(contentId, contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
Tag Overload 2
Render's a 'Tag' control
Velocity
#set($stringResponse = $core_v2_ui.Tag($contentId, $contentTypeId, "%{ CssClass = $cssClassArg, ReadOnly = $readOnlyArg, TagTypeId = $tagTypeIdArg, UrlFormat = $urlFormatArg }"))
JavaScript
var stringResponse = core_v2_ui.Tag(contentId, contentTypeId, { CssClass: cssClassArg, ReadOnly: readOnlyArg, TagTypeId: tagTypeIdArg, UrlFormat: urlFormatArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional | ||
ReadOnly | Boolean | Render the tag UI as read-only | Optional | ||
TagTypeId | Guid | Tag TypeId | Optional | ||
UrlFormat | String | URL used to link tags. {tag} will be replaced with the current tag | Optional |
Tag Overload 3
Render's a 'Tag' control
Velocity
#set($stringResponse = $core_v2_ui.Tag($contentUrl, $oauthClientId))
JavaScript
var stringResponse = core_v2_ui.Tag(contentUrl, oauthClientId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required |
Tag Overload 4
Render's a 'Tag' control
Velocity
#set($stringResponse = $core_v2_ui.Tag($contentUrl, $oauthClientId, "%{ CssClass = $cssClassArg, ReadOnly = $readOnlyArg, TagTypeId = $tagTypeIdArg, UrlFormat = $urlFormatArg }"))
JavaScript
var stringResponse = core_v2_ui.Tag(contentUrl, oauthClientId, { CssClass: cssClassArg, ReadOnly: readOnlyArg, TagTypeId: tagTypeIdArg, UrlFormat: urlFormatArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required | ||
CssClass | String | Additional CSS Class(es) to apply to the placeholder | Optional | ||
ReadOnly | Boolean | Render the tag UI as read-only | Optional | ||
TagTypeId | Guid | Tag TypeId | Optional | ||
UrlFormat | String | URL used to link tags. {tag} will be replaced with the current tag | Optional |
Returns
String
UserPresence
Velocity
#set($stringResponse = $core_v2_ui.UserPresence($userId))
JavaScript
var stringResponse = core_v2_ui.UserPresence(userId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userId | Int32 | User Id | Required |
Returns
String