Sign in

Handlebars : CheckIf with multiple conditions / operator

  • This topic has 4 replies, 2 voices, and was last updated 1 week, 2 days ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10594
    Avatar photoAndy

    is it possible to do something like this?

    {{#each tags}}
    {{#checkIf id '!=' 1 || id '!=' 2 || id '!=' 3}}
    {{name}}
    {{/checkIf}}                     
    {{/each}}

     

    #10595
    Avatar photoTomasz Dziuda

    Hi,

    Currently it is not possible, but we will add in upcoming Publii v.0.43 two new features:

    – contains and notContains operator for checkIf:

    {{#checkIf id ‘notContains’ [1,2,3]}}

    – new handlebars helper – notContains:

    {{#notContains id “1,2,3”}}

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #10604
    Avatar photoAndy

    Oh, cool! This could be a really good thing!

    thanks for the feedback 🙂
    Do you have any idea when this is planned?

    #10605
    Avatar photoTomasz Dziuda

    We will release Publii v.0.43 in nearest 1-2 weeks

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #10606
    Avatar photoAndy

    Many Thanks !

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.