When clicking on a tag, show pages with that tag in subfolder

I have this nice query

${template.each(query[[
  from index.tag "tag" 
  where _.parent == "page" and page:startsWith("Journal/") 
  select {name=_.name}
]], template.new[==[
#${name}
]==])}

When I click on a tag I am sent to a /tag... page where I can see a list of all pages that are using that tag. Is it possible to be sent to a custom page or something where the list of pages is filtered to only include pages that startsWith(“Journal”)?

I’m not sure how I would go around implementing this.

Still interested in ideas. But I’m considering that perhaps my problem is better solved by using frontmatter attributes instead of tags.

  • rewrite query to return list of pages that have —type: journal—
  • have another query on this page that shows related pages, or something like that

You probably can use feature called Virtual pages, and create your own system of pages, with scheme like journalpages:<tagname>