{{#unless page}} not working?
Hi, I am trying to render some elements in an entry.html template only if it is a post but not a page. To do so, I have:
{{#unless page}}
<div id="TOC">
{{> toc}}
</div>
{{/unless}}
so that I can only load a table of contents on appropriate pages. However, this seems to not work. On all views, whether page or post, this seems to still load the toc. What is happening? What might I be doing wrong?
ah, I found my own answer. unless is a handlebars keyword, but isn't available in mustache
instead you can do {{^page}}...{{/page}} to have content that only appears on posts
Answered 4 years ago ยท Edit answer