From: Aaron Arney Date: Tue, 10 May 2016 18:10:30 +0000 (-0400) Subject: Add ifequal helper documentation to readme.md X-Git-Tag: v6.2.4-rc1~32^2~19^2~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8764%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Add ifequal helper documentation to readme.md The helper function is present in the source code, but not documented. This commit adds the function and a single use case to the helpers section of the readme. --- diff --git a/docs/pages/panini.md b/docs/pages/panini.md index 3b76e22ff..001076a0a 100644 --- a/docs/pages/panini.md +++ b/docs/pages/panini.md @@ -120,6 +120,14 @@ The `../` is added only on pages in a sub-folder, so the CSS can still be proper Helpers are special functions that manipulate content on the page. In addition to [Handlebars's built-in helpers](http://handlebarsjs.com/builtin_helpers.html), Panini includes a few custom helpers and you can add your own. +### ifequal +Displays the HTML inside the helper if the two values are equal. +```handlebars +{{#ifequal foo bar}} +

foo and bar are equal

+{{/ifequal}} +``` + ### ifpage Displays the HTML inside the helper only on specific pages. In the below example, the HTML inside the helper will only show up on the `index.html` page.