Help center templating cookbook

Return to top

4 Comments

  • Catherine Michalak

    Hi,

    Is there anyone who could help me add subsections to my custom HC code?

    I am struggling to get the section with subsections to show if it doesn't have an article in it (ie. the subsections have articles but until there's an article in the section itself, it doesn't show on the category page) and struggling to keep the layout the same on the section with subsections level as it is on the category with sections level.

    TIA!

    Catherine

     

    0
  • Emelie Stjernquist

    Hello @...,

    Just so I get it right, you wish to display an "empty" section?

    I'm not sure that that is possible to do (at least I've not manage to do that), however I have a suggested work-around which is to:

    1. Create an Article on the Section you wish to display (one that is OK to find if found via search function)
    2. Create a custom Section-template where you modify the html, remove the part that displays/list the articles - Guide from Zendesk help
    3. Edit the Section and assign the new template and publish the Section and Article

    I usually elaborate, test back and forth in the templates until I get the result I want. You can also preview it in "Preview mode" before publishing it.

     

    I hope this helps you to get closer to what you wish to accomplish, good luck!

    //Emelie

    0
  • François Spinnael

    The Current_local.name trick isn't working. 

    I'm using this list: https://support.zendesk.com/hc/en-us/articles/203761906-Zendesk-language-support-by-product

    And for some reason, the rename of the "language" is working for English (World) that is defined as a "Variant" but all the other ones, aren't working (Estonia, Lithuania, Latvia, Luxembourg,...)

    <button class="dropdown-toggle" aria-haspopup="true">
    {{#is current_locale.name 'English (Luxembourg)'}}
    Test
    {{else}}
    {{current_locale.name}}
    0
  • Augusto Silva

    Hey @...

    Try something like this instead (language names can change):

    {{#contains current_locale.url "/en-us"}}
    true
    {{else}}
    false
    {{/contains}}
    0

Please sign in to leave a comment.

Powered by Zendesk