Newbie here, so apologies if this is common knowledge…
Trying to create a collection with a unique post template. I have the collection working, but it isn’t using the template I’m expecting, so clearly I’m doing something wrong.
collections:
/status/:
permalink: /status/{slug}/
filter: tag:status
template: status
I’m expecting it to use status.hbs from within the root theme directory, but it just uses the default.
I know I can do custom-status.hbs and select the proper template from the editor, but since all posts in this collection should use this custom template, it makes more sense to do it within routes.
Looks like you’ve got the majority of it right, but I think filter: tag:status is meant to be filter: primary_tag:status? There’s some documentation on the Ghost docs just here Ghost Themes - Dynamic URLs & Routing
Thanks for getting back. Actually the filtering seems to be working just fine. It’s the linking up with the status.hbs which doesn’t seem to be working. Any tips there?
The collections template key is for setting the template of that listings page, not the individual posts. If you want to change the single post views design you’ll need to do that in the post template code I think