Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Tag cloud can work for multiple blogs in one site?

Started by Ton Haarmans 5 years ago · 8 replies · 480 views
5 years ago

Isn't it working? I see same tags listed on Popular tags block

5 years ago

Yes, the tags appear. But, if you are on the blog page, the tags connected to that page will show the right blog items, the other tags lead to the home page. Similar, when you are on the Reisverhalen page, only the tags connected with those blog items will show; tags connected with the blog page will show the home page...

5 years ago

OK, so you want each tag to show items from both blogs? Or to list tags only used in a current blog?

I'm not sure I'll be able to help actually, because I'm not really familiar with tags yet, but specifying the expected result might help others to understand what you need

5 years ago

Yes, I want the tags show items from both blogs...thanks for clarifying.

5 years ago

Most likely what is happening there, tag links are pointing to the blog where they are displayed

TXT
/blog/tag:spanje
/reisverslagen/tag:spanje

And each page takes it's children article collections.

I don't know at what extent Tag cloud plugin allows you to customize where tags link to, but I guess you'd need to create a new page with collection from both blogs children. Depending on your page structure, frontmatter could be something like

YAML
content:
    items: '@self.siblings'

or maybe

YAML
content:
    items:
        - '@page.children': '/blog'
        - '@page.children': '/reisverslagen'

(actually not sure if this will merge collections 😕 Rereading the docs and maybe this is not an option after all)

And tags should point to that new page, eg.

TXT
/all-blogs/tag:spanje
last edited 03/21/21 by Karmalakas
5 years ago

Thanks. Both suggestions did not work. For some reason there can be only one blog where the tag cloud items will point to, unless you are on the other blog's pages. The merge page itself did work, but the taxonomy list could not find it, also not when I pointed the List to the merge page.

But thanks for thinking with me. Perhaps there are other plugins then Taxonomy List that can do this, or maybe this plugin can be changed...

last edited 03/22/21 by Ton Haarmans
5 years ago

I solved it for now with bringing it down to one blog...

5 years ago

I was thinking you could keep two blogs, but change structure a bit. But even with one blog you could have kinda two of them by using category taxonomy. Although you might need to extend templates maybe to have links with category everywhere

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 80 10 hours ago
General · by pamtbaau, 15 hours ago
1 51 14 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago