Advanced helpers

The following helpers provide advanced functionality. We don't recommend heavily customizing the output of any of these helpers with JavaScript or CSS because their internal implementation might change in the future.

Global advanced helpers

The following advanced helpers are available in all templates:

Shared advanced helpers

The following advanced helpers are only available in certain pages:

chat helper

{{chat}}

An embedded chat interface allowing visitors to chat with agents. Chat must be enabled for Help Center.

Availability
  • All pages

recent_activity helper

{{recent_activity}}

A list of 5 recent activities for Help Center. Recent activities consist of the following:

  • Newly created articles
  • New translations of existing articles
  • New comments on articles

If the affected article is not visible to the user, the activity won't be displayed in the list.

If you set scope='community' (see below), the following activities are displayed:

  • New community posts
  • New community comments

There's no time limit for recent activity. If the most recent activity was a year ago, it will still appear at the top of the list.

Availability
  • All pages
Parameters
  • scope (optional, string) Can be community, category, or section. If set to community, displays the 5 most recently created community posts or post comments visible to the user. If set to category or section, displays only recent activity for a category or section. The category and section scopes only work in the Category and Section page templates respectively.
Example
{{recent_activity scope='section'}}

recent_articles helper

{{recent_articles}}

A list of recently viewed articles.

Availability
  • All pages

actions helper

{{actions}}

A user menu including all the available actions for the current object.

Availability
Example
{{#each comments}}
  ...
  <span class="comment-actions">
    {{actions}}
  </span>
{{/each}}

category_tree_with_article helper

{{category_tree_with_article}}

A list of categories, sections and expandable articles.

Availability
  • Home

chat_about_my_ticket helper

{{chat_about_my_ticket}}

The same as {{chat}} but will inform the agent about the request which the visitor is currently looking at. Chat must be enabled for the Help Center.

Availability
  • Request page

comment_callout helper

{{comment_callout}}

A link for users to create a new comment or a follow-up ticket, if allowed.

Availability
  • Article page
  • Request page
Example
{{comment_callout}}
Output

When placed in article page:

<!-- if comments are disabled -->
Article is closed for comments.

<!-- if user not signed in -->
Please <a href="/path_to_sign_in/">sign in</a> to leave a comment.

<!-- if signed in and there is no comments yet -->
Be the first to write a comment.

follow_up helper

{{follow_up}}

A link to the parent request, if it exists.

Availability
  • New Request page

token_field helper

{{token_field 'identifier'}}

An input that turns into a field with tokens, providing input validation as well as fast input deletion.

Token field

Availability
Parameters
  • identifier (required, string) Depends on the page and the form that has the field. See identifiers.
Example
{{#form 'comment' class='comment-form'}}
  {{#if help_center.request_ccs_enabled}}
    {{token_field 'ccs' class="ccs-input"}}
  {{/if}}
  {{textarea 'body' rows='4'}}
  {{input type='submit'}}
{{/form}}

related_articles helper

{{related_articles}}

A list of related articles.

Availability
  • Article page

request_callout helper

{{request_callout}}

A link for users to create a request, if they are allowed.

Availability
  • Article page
Example
{{request_callout}}
Output
<!-- this is only displayed if user can submit a request -->
Have more questions? <a href="/path_to_new_request/">Submit a request</a>

request_form helper

{{request_form}}

Displays a form to submit a support request. The form includes ticket fields as defined in the agent interface. For more information check this article.

Please note that this is a different form than the form helper.

Availability
  • New request page

satisfaction helper

{{satisfaction}}

The satisfaction rating of the request, if any.

Availability
  • Request page

section_tree_with_article helper

{{section_tree_with_article}}

A list of sections and expandable articles.

Availability
  • Category

upload helper

{{upload}}

A file upload interface allowing visitors to upload files. Drag and drop is available only on browsers that support this HTML5 feature. Only one upload helper is valid per page.

Availability
Example
{{#form "comment"}}
  ...
  <div class="comment-attachments">
    {{upload}}
  </div>
{{/form}}

user_info helper

{{user_info}}

A user menu that includes a link to the user's profile page, an option to change password, and a link to sign out.

Availability
  • Header

wysiwyg helper

{{wysiwyg 'identifier'}}

A textarea that turns into a "wysiwyg" editor when it receives focus, allowing visitors to insert rich content. This helper is an enhanced version of the textarea). It accepts the same identifier as a parameter, but unlike the textarea, it does not accept attributes.

Availability
Parameters
  • identifier (required, string) the name of the field. Depends on the page and the form that has the field. See identifiers.
Example
{{#form "post"}}
  ...
  <div class="form-field">
    {{wysiwyg 'details'}}
  </div>
{{/form}}

edit helper

{{edit}}

Inserts an "edit" button that allows the owner of the profile to edit his or her information.

Availability
  • User profile page