Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

getPostsByTags in Post page is possible?

#2618
Avatar photo[anonymous]

Thank you @Verhoeckx,

but it’s not the solution I’m looking for.

I’m trying to access the much more flexible and powerful {{#getsPostsByTags}} helper. This inside post.hbs file. {{getsPostsByTags}} helper allows you to manage many more parameters such as multiple tags.

What I’m trying to get is a “post” similar to the Mercury home page, but it’s a post not a front page.

I have tried two ways:

  1. Mark the posts that I want to display as “featured” and access them with {{#each featuredPosts}}. It’s not an elegant method, but it works. The problem is that I “waste” the featured post function.
    This is the result, is a post page that shows posts from some specific categories:
    https://www.mywebpassion.it/siti/bw/portfolio/
  2. Use global variable {{#each @website.contentStructure.posts}} but managing multiple tags becomes very complicated.