Tag & archive items not redirecting within two blogs

Hey folks,

I have created a website for my classes with Grav. So far it works perfect. I decided to use two different blogs on this website. This seems to cause a problem with Tags & Archives.

  1. Tags are correctly shown in my sidebar (all Tags are shown on both blogs).
  2. Archives are correctly shown in my sidebar (all Archive items are shown on both blogs).

Issue: If I click Tags or Archive items it will only show the ones provided in the blog I have opened at this very moment. The link won’t redirect to the other blog.

I tried to figure out what I have to do in the twig files to implement a redirect, but I don’t seem to do it right.

I guess this is considered quite a newbie problem, but I would be very grateful, if someone took few minutes and helped me out here.


Have you checked that you include all tags needed in both different blogs? Can you provide a screenshot of your current view on the page that includes both, and the one that misses some? Just to make this question a bit easier to understand, thanks!

Thank you for your reply RobLui,

The tags I use are both connected to the default ‘blog template’. I want to use the tags sidewide (to make it possible for students to click them from any page).

If I click one of the tags (which should be linked to a different blog on my site, the link will only show a blank page like this (In this case I clicked the #simplepresent tag, which is from a different blog in a different folder:

Let’s say my folder would be startingpage and the other blog would be faecher:

  • The link on the tag would be: startingpage1/tag:simplepresent
  • But I guess (?) it should be: faecher/tag:simplepresent
  • Tags which were created on the page startingpage1/tag:whatevertag will be shown correctly when clicking it.

I would be glad, if there is an easy solution to this :slight_smile:

I’m not sure 100%. I will double check this and post another reply. Thanks.

I have a similar setup, and you need to fiddle with the ‘Blog Route’ in Blog Config.

That determines the new_base_url used in the templates to search in the correct area.

To add to that: this only works well for the first page in /root (eg blog, blog2 in there). But when you add more pages in that blog2 directory, then the tag search is still in the first /blog.
Anyone knows if that is a bug, or am I doing something wrong here?

You can double check by using
{{ new_base_url|t }}
{{ blog.url|t }}