Sign in

tag(s).hbs does not build post list automatically

  • This topic has 1 reply, 2 voices, and was last updated 1 year, 2 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #8202

    Hi there,

    I built a menu in Publii with an entry labeled foo and type Tags list link.

    I tried the following code on tag.hbs to show the corresponding post. Unfortunately, it does not work. So, what am I doing wrong ?

    And secondly, how do I make this dynamically to use one *.hbs for all tags…

    {{#each @website.contentStructure.tags}}
      {{#checkIf '==' 'foo'}}
        {{#if this.postsNumber}}
          {{#each this.posts}}

    Thanks, Michael

    Avatar photoTomasz Dziuda


    Why are you using such construction if tag.hbs can display all related posts: ? Please look how tag.hbs is constructed in our free themes.

    Your code won’t work, because in the contentStructure tag items contain posts field, but it contains only IDs of related posts, so you have no direct access to the post titles there.


    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘tag(s).hbs does not build post list automatically’ is closed to new replies.