Intuitive, expansive and flexible creation with no distractions.
Robust, user-friendly data protection for your visitors and you.
Modern, effective solutions for site growth and functionality.
Professionally designed and coded themes and plugins.
Free and premium, beautifully-designed templates.
Expand your site with your favorite tools and apps.
Get help building your site from our web development services.
Learn how Publii works, from installation to creation.
Documentation, guides, and tutorials for developers.
Explore and interact with others and learn new things.
Dedicated customer support for paid products.
Read up on the latest news about Publii and its products.
Forum › General Inquiry
How to know if there are no posts associated with a tag using getPostsByTags?
I want to place other content if there are no posts found for a specific tag so that I do not end up with an empty section.
Cheers!!
Try to play with @index variable e.g.:
{{#checkIf @index '==' 0}} <p>IT'S THE FIRST ELEMENT!</p> {{/checkIf}}