Using the help center templating language

Return to top

5 Comments

  • Steve Graham

    Is there a way to create a custom boolean?  For example, we'd like to create a boolean called "legacyproduct" to use in an #if loop in order to attach a class to an element.

    0
  • Harver Admin

    Hi Steve,

    At the moment this doesn't appear to be possible with the Templating Language.
    I would recommend doing it with Javascript. And then map this there.

    0
  • Ellis Simpson

    On category and section pages, I want to display the text from each article which is between each article's h1 tags (rather than what is in each title tag). 

    I assume the relevant code will go in category-page.hbs and section_page.hbs.

    This is, I think, what currently displays the title.

    <a class="article-list-item__link" href="{{url}}">{{title}}</a>

    Is such an action possible? If so, how in rough outline can you do that?

    0
  • Nathan Purcell

    "Note that nesting a pair of curlies within other pair of curlies is not valid syntax"

    How then would you go about achieving this? 

    Example: I want to set the placeholder of the search field to be some dynamic content: 

    {{search instant=true placeholder={{dc 'key'}} }}
    0
  • Augusto Silva
    Zendesk Engineering

    Hey Nathan Purcell,

    That can be achieved with subexpressions - have a look here https://developer.zendesk.com/documentation/help_center/help-center-templates/introduction/#subexpressions 😊

    1

Please sign in to leave a comment.

Powered by Zendesk