From 1f451a1842abf9de1e3323fde02b62d050ff8d86 Mon Sep 17 00:00:00 2001 From: David Luhr Date: Thu, 8 Jun 2017 11:24:36 -0600 Subject: [PATCH] Add else statement inside of ifequal example It is unclear that else statements are possible inside of {{#ifequal}} helpers to show HTML if the two values are not equal. Because there are {{#ifpage}} and {{#unlesspage}} as separate equal/not equal helpers, users may be confused that there is no equivalent "unlessequal" helper or "!" syntax. I have successfully used the {{else}} Handlebars helper inside if the {{#ifequal}} Paini helper to achieve the desired "not equal" condition, but only thought to try this as a guess after a lot of unsuccessful searching through documentation on both Handlebars and Panini. --- docs/pages/panini.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/panini.md b/docs/pages/panini.md index 3d6a03b82..696b0a2aa 100644 --- a/docs/pages/panini.md +++ b/docs/pages/panini.md @@ -126,6 +126,8 @@ Displays the HTML inside the helper if the two values are equal. ```handlebars {{#ifequal foo bar}}

foo and bar are equal

+{{else}} +

foo and bar are not equal}} {{/ifequal}} ``` -- 2.47.2