I’m a newbie on Ghost and I’m trying to build my own template (brave / stupid idea to begin working with Ghost I guess…) and I’m frustrated with one idea I have on my mind…
So I want to be able to create a page, build that page with content and dynamically I want to add in the bottom a list of the posts by a certain tag.
P.Ex. I want to build a page called “id” that will contain a post introducing that topic and underneath a list of posts (or better the link for the posts) that are under the tag #identity
Then I want to have this under blog.domain.com/id/ which will be specified on the navigation.
I’m a bit confused with the routing (maybe the routing answer this) but definitely I need to build a template that will include the post/page and the list of tags, right?
Finally I created a post with the title Identity and… Violà!
However, still need to format properly the list as cards won’t do what I need / expect really…
And if someone has any suggestion to improve this big mess I’ve done, please feel free to ping me
Glad you got it working! Can I ask if you made a page in the admin with the slug of identity when you tried this method?
Using the page-{slug}.hbs way of creating templates should correspond with the page slug names in your Ghost admin. It’s then just a matter of using things like {{content}} to expose the page content / data. You wouldn’t have to use #get either as the page context would already be there and the collection of post types would already be there too
Sorry for my delay in getting back to you David, appreciate you replying to my message and giving me an explanation about the {{content}} part. As the noob that I am, still learning the ropes of Ghost it really helps to have someone giving some pointers!
In the end I only placed the title of the post / page in the filter condition as I do not want the page / post to appear as well on the list of articles underneath.
I did tried with the slug of identity but then it would appear underneath and that was not what I wanted, so I focused on the title only and made that as “featured page”.
I’ll test with the {{content}} call in order to be able to format the list of tags under