handlebars.js - Handlebars templatig: Difference between empty list and list not given -


i creating summary emails recent activities can configured recipient. using mandrill handlebars templating syntax , {{#each objects}} passing in objects.

that works fine. , can use {{else}} display message when list empty. (that event hasn't happened in referenced period of time)

but want give user option never see summary particular kind of event (no matter whether exist or not). tried using {{#if objects}} , not adding parameter user. results in entire block not showing when list empty. in case want "no recent activity in category" has been working fine far.

tl;dr: how differentiate between parameter not given , empty list given handlebars.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -