Closed tedtninety closed 1 year ago
Hi @tedtninety,
Thank you for your question. The part of the code that you mention is not totally correct. Your logic is good but is not how the Handlebars Helper works.
As mentioned in the documentation: "Block helper that renders a block if a is equal to b".
In other words, the current code looks like this:
if( if([your-condition]) {
...
}) {
...
}
The correct code is:
{{#eq @root.slots.Category "desiredValue"}}
{{else}}
{{/eq}}
We hope this information will help you.
Thank you
Thank you Laul0!
Hi, I'm trying to check if root.slots.Category is equal to a particular value. If it is then it provides a URL
{{#if (eq @root.slots.Category "desiredValue")}}
{{else}}
{{/if}}
No matter what I do, I get r.inverse is not a function error.
Any help would be greatly appreciated. Cheers