Using the Help Center templating language (Guide Professional and Enterprise)

Have more questions? Submit a request

35 Comments

  • Joakim Eide
    Comment actions Permalink

    I've been looking all over this place for a way to extract the first or nth- element from an array in this Curlybars langauge, can anyone help me with that? EVERY example in this place uses the #each, as if it's impossible to get the first article when you have the data available?

    0
  • Trapta
    Comment actions Permalink

    Hi @Joakim Eide,

    You can use {{@index}} to get nth-element from an array. Please look at the below code to get an idea:

    {{#each categories}}
    {{#is @index 1}}
      // Your code goes here
    {{/is}}
    {{/each}}

    Let me know if this is what you are looking for.

    Team Diziana

    2
  • Joakim Eide
    Comment actions Permalink

    Thanks a lot Trapta! I feel like I somewhere read that Curlybars is based on Handlebars and does not have all the functionality. So I felt it natural to assume that the functionality describe on Zendesks template language pages reflects all available functions.

    I'll check handlebars documentation from now on before I ask questions! :)

    0
  • intakhab ali
    Comment actions Permalink

    hi, i am trying to create customize the community page I want a list of topic and list of post in the same page, is it possible

    0
  • Devan - Community Manager
    Comment actions Permalink

    Hello Intakhab,

    This is possible through the use of custom code. I've gone ahead and linked an article below that describes how to begin this process in further detail.

    Customizing your Help Center

    Best regards!

    0

Please sign in to leave a comment.

Powered by Zendesk