if condition with and in pdf template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • czcpf
    Senior Member
    • Aug 2022
    • 160

    if condition with and in pdf template

    Is it possible to create a condition in PDF template that is a combination of two comparisons (ie. if this and that). Code below doesn't work. Is there some other syntax?

    {{#if 'p' [=] 'k [&] 'j' [=] 'k'}}
    false
    {{/if}}​

    {{#if 'p' [=] 'p' [&] 'j' [=] 'j'}}
    true
    {{/if}}​​
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1602

    #2
    I think, you will find a solution here: https://www.cloudhadoop.com/handlebarjs-if-helper/

    Comment


    • esforim
      esforim commented
      Editing a comment
      Cool website.
  • yuri
    Member
    • Mar 2014
    • 8440

    #3
    Code:
    {{#ifEqual a b}}{{#ifEqual c d}}
        true
    {{/ifEqual}}{{/ifEqual}}
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • czcpf
      Senior Member
      • Aug 2022
      • 160

      #4
      Thanks. Was hoping for something not requiring a nested handlebar type approach; which is what I ended up doing.

      Comment

      Working...