Multiple Conditions in an #is statement

Answered

2 Comments

  • Official comment
    Trapta
    Community Moderator

    Hi @Aaron Stewart,

    In response to your first question,

      - You cannot get a category id on article template using Zendesks' HC components but, you can get it using some Javascript. Please refer to Get category_id from section page. You can use the piece of code written by Vladan Jovic on article template to get the category id.

    In response to your second question,

      - You cannot use OR property within an #is evaluation, you can nest #is statement within the else to allow you to check multiple sections but, in this case, you have to repeat code for both the sections. Something like this -

    {{#is section.id 200893084}}
      {{! show the author}}
    {{else}}
      {{#is section.id 200117648}}
        {{! show the author}}
      {{/is}}
    {{/is}}

     

    Cheers

    Team Diziana

  • Nicole Saunders
    Zendesk Community Team

    Hey Aaron - 

    Apologies for the confusion; some updates were being rolled out last night which temporarily broke the search functionality. Everything is up and running again now. 

    I'm looking into your question, but hopefully someone from the community can jump in in the meantime! 

    0

Post is closed for comments.

Powered by Zendesk