]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add ifequal helper documentation to readme.md 8764/head
authorAaron Arney <ocularrhythm@users.noreply.github.com>
Tue, 10 May 2016 18:10:30 +0000 (14:10 -0400)
committerAaron Arney <ocularrhythm@users.noreply.github.com>
Tue, 10 May 2016 18:10:30 +0000 (14:10 -0400)
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.

docs/pages/panini.md

index 3b76e22ff91cfd0a7a2745555416820aa1fbfae1..001076a0a88308bed3b104db94b84c2c78db057e 100644 (file)
@@ -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}}
+  <p>foo and bar are equal</p>
+{{/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.