Objects
Objects
The page lists the objects you can use in Help Center templates. Click the page links in the left sidebar for the availability of the objects in different templates. To learn how to access object properties in your templates, see Properties in the introduction.
activity object
The activity
object has the following properties.
Name | Type | Description |
---|---|---|
label | string | The translated label showing the type and the time of the contribution made by the user |
type | string | The type can be created-article , created-post or created-comment |
contribution | object | A contribution object related to the activity |
article object
The article
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the article |
url | string | The URL of the article in Help Center |
title | string | The title of the article |
body | text | The body of the article |
locale | string | The locale that the article is displayed in |
promoted | boolean | If the article is promoted or not. False by default |
internal | boolean | If the article has a "staff" user segment. See User Segments |
updated_at | string | The time the article was last updated |
created_at | string | The time the article was created |
edited_at | string | The time the article was last edited in its displayed locale |
vote_sum | integer | The sum of upvotes (+1) and downvotes (-1), which may be positive or negative |
vote_count | integer | The total number of upvotes and downvotes |
upvote_count | integer | The number of up votes on this article |
comment_count | integer | The number of comments on this article |
comments_disabled | boolean | If comments are disabled or not |
author | object | A user object describing the author of the article |
vote | helper | Voting elements. See vote helper |
path_steps | array | An array of path_step objects describing the path to the article |
labels | array | An array of article label objects |
article comment object
The article comment
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the comment |
body | string | The body of the comment |
anchor | string | The anchor id of the comment |
url | string | The URL of the comment |
created_at | string | The time the comment was created |
edited_at | string | The last time the comment was edited |
pending | boolean | If the comment is pending approval or not |
vote_sum | integer | The total sum of votes on this comment |
vote_count | integer | The number of votes cast on this comment |
author | object | A user object describing the author of the comment |
editor | object | A user object describing the editor of the comment if the comment was edited |
ticket | object | A ticket object related to the comment, if available |
actions | helper | Links to the actions available (depending of the account and the user) for the comment |
vote | helper | Voting elements. See vote helper |
article label object
The article label
object has the following properties.
Name | Type | Description |
---|---|---|
identifier | string | The name of the label |
attachment object
The attachment
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the attachment |
url | string | The URL of the attachment |
name | string | The name of the attachment |
size | string | The size of the attachment |
badge object
The badge
object has the following properties.
Name | Type | Description |
---|---|---|
id | string | The id of the badge |
name | string | The badge's name |
description | string | The badge's description |
category_slug | string | The slug of the badge’s category |
icon_url | string | The URL of the badge’s icon. Empty if the badge does not have an icon |
assigned_at | string | The time the badge was awarded to the user |
category object
The category
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the category |
name | string | The name of the category |
description | string | The description of the category |
url | string | The URL of the category in Help Center |
sections | array | An array of category section objects |
contribution object
The contribution
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the contribution |
title | string | The title of the contribution |
url | string | The URL of the contribution |
object_type | string | The type of the contribution |
type | string | The translated type of the contribution |
vote_sum | integer | The total sum of votes on the contribution |
last_activity_at | string | The time of the last activity on the contribution |
created_at | string | The time the contribution was created |
edited_at | string | The time the contribution was edited |
status | string | The status of the contribution |
status_name | string | The translated status of the contribution |
status_dasherized | string | The contribution status with dashes instead of underscores |
body | string | The body of the contribution |
pending | boolean | Whether the contribution is pending for approval |
official | boolean | Whether the contribution is marked as official |
path_steps | array | An array of path_step objects |
stats | array | An array of stat object |
author | object | The user object describing the author of the contribution |
editor | object | The user object describing the editor of the contribution |
filter object
The filter object has the following properties.
Name | Type | Description |
---|---|---|
identifier | string | The filter's identifier |
name | string | The filter's name |
url | string | The URL of the filter |
selected | boolean | If the filter is on or off by default |
label | string | The label for the filter when is selected |
count | integer | The number of records matching this filter |
group object
The group
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the group |
name | string | The name of the group |
help_center object
The help_center
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the current Help Center |
url | string | The URL of the current Help Center |
locale | string | The locale in which the Help Center is being viewed |
community_enabled | boolean | If community is enabled in the current Help Center |
request_management_enabled | boolean | If end users can manage their requests in the current Help Center |
request_ccs_enabled | boolean | If end users can add CCs to the requests in the current Help Center. See "Enable CCs for end users on Help Center" in the table in Setting permissions for CCs and followers in the Support Help Center |
locale object
The locale
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the locale |
url | string | The URL of the locale |
direction | string | The direction in which the language is read. Example: English is "ltr" (left to right) while Arabic is "rtl" (right to left) |
path_step object
The path_step
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the path step |
url | string | The URL of the path step |
target | string | The target in which the URL should be opened. Example: _self or _blank |
post object
You can use the following properties in any post
object.
Name | Type | Description |
---|---|---|
id | integer | The id the post |
title | string | The title of the post |
url | string | The URL of the post in Help Center |
details | string | The body of the post |
created_at | string | The time the post was created |
updated_at | string | The time the post was last updated |
edited_at | string | The time the post was last edited |
comment_count | integer | The number of comments on the post |
follower_count | integer | The number of users following the post |
vote_sum | integer | The total sum of votes on the post |
vote_count | integer | The number of votes cast on the post |
pending | boolean | If the post is pending approval or not |
pinned | boolean | If the post is pinned |
featured | boolean | If the post is featured |
closed | boolean | Whether further comments are allowed |
actions | helper | Partial rendering the actions possible on the post |
status | string | The post status |
status_dasherized | string | The post status with dashes instead of underscores |
status_name | string | The post status translated |
ticket | object | A ticket object related to the post |
author | object | A user object describing the author of the post |
editor | object | A user object describing the editor of the post if the post was edited |
vote | helper | Voting elements. See vote helper |
path_steps | array | An array of path_step objects describing the path to the post |
post comment object
You can use the following properties in any post comment
object.
Name | Type | Description |
---|---|---|
id | integer | The id the comment |
anchor | string | The anchor id of the comment |
url | string | The URL of the comment |
vote_sum | integer | The total sum of votes on the comment |
vote_count | integer | The number of votes cast on the comment |
created_at | string | The time the comment was created |
updated_at | string | The time the comment was last updated |
edited_at | string | The time the comment was last edited |
official | boolean | If the comment is official or not |
pending | boolean | If the comment is pending approval or not |
body | string | The body of the comment |
actions | helper | Partial rendering the actions possible on the post |
author | object | A user object describing the author of the comment |
editor | object | A user object describing the editor of the comment if the comment was edited |
ticket | object | A ticket object related to the comment, if available |
vote | helper | Voting elements. See vote helper |
internal | boolean | If the post is internal or not |
related_article object
The related_article
object has the following properties.
Name | Type | Description |
---|---|---|
url | string | The URL of the article in Help Center |
title | string | The title of the article |
request object
The request
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the request |
url | string | The URL of the request in Help Center |
subject | string | The subject of the request |
description | string | The description of the request |
updated_at | string | The time the request was last updated |
created_at | string | The time the request was created |
status | string | The status of the request |
status_description | string | A description of the status of the request |
status_name | string | The localized version of the status value |
requester | object | A user object describing the requester author |
due_at | string | When the task is due (only applies if the request is of type "task") |
due_date | string | Same as due_at but Localized according to current locale. |
type | string | The type of the request, "question", "incident", "problem", "task" or "none" if not assigned |
type_name | string | The localized version of the type value |
type_title | string | The title shown to end users for the type field |
priority | string | The priority of the request, "low", "normal", "high", "urgent" or "none" if not assigned |
priority_name | string | The localized version of the priority value |
priority_title | string | The title shown to end users for the priority field |
followup_source_id | integer | The id of the previous request if this is a followup request |
can_be_marked_as_solved | boolean | If user can mark the request as solved |
Both type
and priority
return falsy
if the field is not visible to the end user.
request comment object
The request comment
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the comment |
anchor | string | The anchor id of the comment |
created_at | string | The time the comment was created |
body | string | The body of the comment |
author | object | A user object describing the comment author |
attachments | array | An array of attachment objects |
request field object
The request field object has the following properties.
Name | Type | Description |
---|---|---|
type | string | The type of the request field |
title | string | The title of the request field |
value | any | The value of the request field |
search result object
The search result object has the following properties.
Name | Type | Description |
---|---|---|
title | string | The title of the search result |
url | string | The URL of the search result |
is_external | boolean | If true, the search result is an external content record |
text | string | A relevant content snippet in the result, with <em> tags applied to the search term and any HTML from the source removed |
vote_sum | integer | The total sum of votes on this search result record |
created_at | string | The time the search result record was created |
edited_at | string | The time the search result record was last edited |
comment_count | integer | The number of comments on this search result record |
meta | string | Meta information for a search result record, e.g.: 'by John Rossi 6 months ago in Kitchen > Recipes'" |
type | string | The type of the search result. Valid values are 'article', 'community_post', and 'external_content_record' |
author | object | A user object describing the author of the search result record |
path_steps | array | An array of path_step objects describing the path to the search result |
section object
The section
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the section |
name | string | The name of the section |
description | string | The description of the section |
url | string | The URL of the section in Help Center |
article_count | integer | The number of articles in the section |
more_articles | boolean | If there are more articles than the ones in the articles array (the current page) |
articles | array | An array of up to 30 article objects. See more_articles above. For sections displayed on category pages, an array of up to 6 article objects. For subsections displayed on section pages, an array of up to 5 article objects |
sections | array | An array of section objects. This array is populated only for Guide Enterprise customers |
settings object
The settings
object has custom properties. The object maps the identifier
and value of the variables defined in the theme's manifest.json file. The property values can be changed using the theme's Settings panel in Guide. See Customizing the Settings panel in the Guide documentation.
In the following example, the settings
object has a custom property with an identifier of color_brand_text
:
<div style="color:{{settings.color_brand_text}}">
Like any other object, you can also use the settings
object in a helper. Example:
{{#is settings.warnings_enabled "Yes"}}
<!--block to render if the setting value is "Yes" -->
{{/is}}
In the example, the warnings_enabled
custom property is a list type variable with "Yes" and "No" options.
stat object
The stat
object has the following property.
Name | Type | Description |
---|---|---|
label | string | The translated status showing the vote count of the contribution. For a post and article contribution, it also includes the comment and follower counts |
subscription object
The subscription
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the subscription |
title | string | The title of the subscribed record |
url | string | The URL of the subscribed record |
type | string | The type of the subscription. Can be article, section, topic |
name | string | The localized string of the type of the subscription |
following | string | The localized string of what types of content are followed |
subscribe | helper | Drop-down menu with links for subscribing |
ticket object
The ticket
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the ticket |
url | string | The URL of the ticket |
ticket form object
The ticket form
object has the following properties.
Name | Type | Description |
---|---|---|
id | integer | The id of the ticket form |
url | string | The URL of the ticket form |
display_name | string | The name of the ticket form |
topic object
You can use the following properties in any topic
object.
Name | Type | Description |
---|---|---|
id | integer | The topic id |
name | string | The topic name |
url | string | The URL of the topic in Help Center |
description | string | The description of the topic in Help Center |
post_count | integer | The number of posts in the topic |
follower_count | integer | The number of users following the topic |
internal | boolean | If the topic is internal or not |
updated_at | string | The time the topic was last updated |
created_at | string | The time the topic was created |
user object
The user
object has the following properties.
Name | Type | Description |
---|---|---|
name | string | The name of the user |
id | integer | The user id |
url | string | The URL of the user in the agent interface |
agent | boolean | If the user is an agent |
avatar_url | string | The user's avatar URL |
badges | array | An array of badge objects |