Private tag behavior in route filters?


#1

Hello,

I’m configuring some dynamic routes to categorize my website post into 3 main categories and just playing with routes.yaml.

This is my current route looks like.

    routes:
      /techroom/:
        controller: channel
        filter: tag:techroom
        permalink: /techroom/{slug}/
        template: techroom/index

    collections:
      /:
        permalink: /{slug}/ 
        template:
          - index

I just want to know how can we specify a private tag (#techroom) in the filter section.
(All I want to do is, list the posts that have the tag #techroom on /techroom/ page. Please, Let me know if I’ve done anything stupid.)

Thank you.


#2

@truekasun you can filter by the slug of your internal tag. You can see this by looking at the “URL” field in the tag settings screen, it should be something like hash-techroom.

17


#3

Oh I see. Thank you very much. I’ve configured the routes in this way and it works like a charm.

    collections:
      /:
        permalink: /{slug}/
        filter: tag:-hash-techroom+tag:-hash-guides
        template:
          - index
      /techroom/:
        permalink: /techroom/{slug}/
        filter: tag:hash-techroom+tag:-hash-guides
        template: techroom/index
      /guides/:
        permalink: /guides/{slug}/
        filter: tag:hash-guides+tag:-hash-techroom
        template: guides/index

#5

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.