How to hide the publish date on pages?
How can I hide the date in my entry.html
template only for pages (not posts)? Alternatively, is it possible to use separate templates (page.html
and post.html
) for pages vs. posts? Or can I prevent date generation for pages entirely?
Absolutely! You can use mustache's 'unless' feature in combination with the 'page' property of each entry, which is 'true' if the entry is a page rather than a post. In your template's entry.html, inside the {{#entry}} block, do something like this:
{{#entry}}
{{^page}}
... html and template code which displays the date
{{/page}}
.. rest of html and template code for rendering the entry
{{/entry}}
Does that make sense? Please let me know if you have any questions about this or anything else
Answered 4 days ago · Edit answer
Newsletter
Get updates on Blot’s latest features and changes. Delivered every three months.