Individual landing pages for taxonomy by category

Hi there,

I am probably just stuck and unable to wrap my mind about the following issue, but I am positive that somebody can shed some light on it :slight_smile:

I am building a company website, that is a mixture of plain information about the company + a showcase of already concluded projects. This showcase of projects is currently a page collection that shows a list of flashcards, one for each project (or simply imagine a page collection of blog posts, with one flashcard for each post, like in the blog skeleton).

So folders and markdown files are organized like this:

../user/pages/02.projects/ (= simple page collection)

Now, each project in its frontmatter has some taxonomy with an assigned category; for example, first-project and third-project belong to category: branding, while second-project belongs to category: website. is showing all projects, without distinguishing the category (and this works fine, with pagination and all).

I’d like to have an individually landing page for each category, so that for example I can get flashcards only for branding. For that I created

../user/pages/02.projects/branding/ (= with taxonomy collection for branding)

That works well, too, except for the links in the pagination: instead of creating links like project.url/projects/branding/page:2, the link to page 2 justs point to project.url/projects/page:2 (without branding), which leads to showing all projects from all categories, once I click a pagination link. I understand the technical reason for that, but this does not solve my problem of getting individual landing pages for each specific category.

Now, I just could work with ../user/pages/02.projects/ and filters like project.url/projects/category:branding, which solves the issues of links in pagination (link to second page is project.url/projects/category:branding/page:2), but this would not allow me to have individual landing pages.

So, any good ideas on how to make this work? Just in case: one project could belong to different categories. E.g. forth-project could belong to category: [branding, website]

Thanks in advance!



You said:

[…] instead of creating links like project.url/projects/branding/page:2, the link to page 2 justs point to project.url/projects/page:2 (without branding), […]

I cannot reproduce this using fresh skeleton of Blog Site (download):

  • Copy /user/pages/ into /user/pages/
  • Replace items and limit with:
      '@taxonomy.tag': [photography]
    limit: 3
  • In pagination section, url of page 2 will be http://blog-dev/blog/photography/page:2

You are right, @pamtbaau

I just checked out the link you sent and what you state is correct.
To crosscheck, I did the same with the typhoon theme + skeleton (which I am using) and there is where the problem occurs.

I’ll sit down later to see if I can find any differences in the templates / partials or config that causes this behaviour and report back.

Thanks for the lead!


1 Like

Here is what I’ve found so far:

When dumping base_url from the pagination twig, in Quark, it returns /blog/photography.
However, when dumping base_url in Typhoon, it returns just /.

Now, in both templates and its corresponding pagination.html.twig, base_url is set as

{% set base_url = base_url|default(page.url) %}

Why it returns in Quark the complete URL and in Typhoon just the root, that I do not know.


EDIT: Got it!

Typhoon has a parameter in the skeleton’s that is called root_of_blog and that in my case was set to true. I am not sure what it does exactly and have not found any documentation on it, but removing it (not even setting it to false) reestablished the desired behaviour.

Thanks again @pamtbaau for pointing me into the right direction.

1 Like