Routing: Is it possible to have 2 different tag taxonomy layouts?


I’m looking for some help with the routes.yaml file config.

I am building a magazine/newspaper style website and I want to route selected (“primary”) tags to a theme page which looks different from “non-primary” tags. Eg. When clicking on (say) the “innovation”, “funding” or “system” tag of a post it goes to one tag taxomony page whereas clicking on any other tag takes the user to different themed taxonomy page.

Is this possible? Really appreciate any advice.


Not with routing, but you could definitely edit tag.hbs to check for the identity of the tag being visited, and change what gets rendered as a result. You could hard code tag.hbs, or check to see if the tag is in a set of values that you add as a custom variable to the theme, so that it can be changed within the Ghost dashboard.

{{#has slug="tag1,tag2,tag3"}}
do one type of layout
do the other layout

Thanks Cathy :pray:t2: much appreciated

1 Like

I can get this to work with a single tag

    {{#has slug="innovation"}}

but it stops working with multiple tags

    {{#has slug="funding,innovation"}}

Any suggestions?

Also can you nest helpers like this?

{{#has slug="{{@custom.supplement_tags}}"}}