Content created on the site must implement this interface for the social services to support it.
Properties
Name | Access | Type | Description |
---|---|---|---|
Application | Read | Application | The application in which the IContent is located. |
AvatarUrl | Read | String | Url to an image particular to the content or content type. If none, return null. |
ContentId | Read | Guid | A Guid uniquely identifying the content. |
ContentTypeId | Read | Guid | A Guid identifying the type of content. All content of the same type (i.e. wiki page) will have the same value here. |
CreatedByUserId | Read | Nullable of Int32 | The Id of the user who originated the content. |
CreatedDate | Read | DateTime | The date the content was created. |
DataTypeId | Read | Guid | Data Type Id |
Errors | Read | IList of Error | Errors |
IsEnabled | Read | Boolean | A flag representing whether the content is enabled. This can be a wrapper for approval states, etc. |
Url | Read | String | A Url to the content on the site. |
Warnings | Read | IList of Warning | Warnings |
Methods
HasErrors
Velocity
#set($booleanResponse = $content.HasErrors())
JavaScript
var booleanResponse = content.HasErrors();
Returns
Boolean
HasWarnings
Velocity
#set($booleanResponse = $content.HasWarnings())
JavaScript
var booleanResponse = content.HasWarnings();
Returns
Boolean
HasWarningsOrErrors
Velocity
#set($booleanResponse = $content.HasWarningsOrErrors())
JavaScript
var booleanResponse = content.HasWarningsOrErrors();
Returns
Boolean
HtmlDescription
Return the Html encoded description of the content (the body, for example). Possible values for “target” are “Web”, “Email”, “WebServices”, or “raw”. When “raw” is specified as the target, the description should not be encoded or have any special rendering done to it.
Velocity
#set($stringResponse = $content.HtmlDescription($target))
JavaScript
var stringResponse = content.HtmlDescription(target);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
target | String | Target | Required |
Returns
String
HtmlName
Return the Html encoded name of the content (the subject for example). Possible values for “target” are “Web”, “Email”, or “raw”. When “raw” is specified as the target, the name should not be encoded.
Velocity
#set($stringResponse = $content.HtmlName($target))
JavaScript
var stringResponse = content.HtmlName(target);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
target | String | Target | Required |
Returns
String
ThrowErrors
Velocity
$content.ThrowErrors()
JavaScript
content.ThrowErrors();
Returns
NothingViewHtml
ViewHtml Overload 1
Velocity
#set($stringResponse = $content.ViewHtml())
JavaScript
var stringResponse = content.ViewHtml();
ViewHtml Overload 2
Velocity
#set($stringResponse = $content.ViewHtml($target))
JavaScript
var stringResponse = content.ViewHtml(target);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
target | String | Target | Required |
Returns
String