Changing collection URLs based on tags

I'm attempting to change the URL in routes: collections to show a different URL based on a tag selected for each blog. I wanted to know if I can do a conditional statement within the routes.yaml file to check:

routes: /blog/tags: blog/taxonomies /blog/feed: layout: feed template: feeds/blog content_type: atom /reviews/tags: reviews/taxonomies /reviews/feed: layout: feed template: feeds/reviews content_type: atom /podcasts/tags: podcasts/taxonomies /podcasts/feed: layout: feed template: feeds/podcasts content_type: atom /search-results: search-results collections: {{ tags }} {{ if title == "SOC Review" || title == "SOC Blog" || title == "SOC Interview" }} blog: '/blog/soc/{slug}' {{ else }} blog: '/blog/{slug}' {{ /if }} {{ /tags }} reviews: '/reviews/{slug}' interviews: '/interviews/{slug}' podcasts: '/{slug}' taxonomies: tags: '/blog/tags/{slug}'

This doesn't work. Any ideas on how I can add the {url}/blog/soc based on a tag selected for that blog?


>>>>>>> Unanswered <<<<<<<
0 Replies
1 Follower