Sitewide tagcloud for Kirby 3

Any suggestions for a sitewide tagcloud ?
For kirby 2, there was a nice “tagcloud” plugin that I “hijacked” a little to filter sitewide content by whatever I wanted (by language, by tags, by content-type). It doesn’t work in Kirby 3, of course.
I’m not a programmer, ok ?

Basically,the difference between filtering your blog by tags or any other categories and filtering your complete site is just a matter of defining the set of pages you want to filter.

While the usual procedure is for example:

$articles = page('blog')->children()->listed();

// add the tag filter
if($tag = param('tag')) {
  $articles = $articles->filterBy('tags', $tag, ',');

There is noone hindering you to use $site->index() instead of $page->children() (apart from the possible performance issue if you have thousands of pages).

Plus, Kirby 3 has a nice new method called when() which makes filtering by multiple categories/tags conditionally even easier.

Long story short: You don’t need a plugin. You don’t need any fancy programming skills. But programmer or not, it pays off to gradually get a better understanding of what you are doing :wink:

I originally studied languages and literature, then worked in marketing, later in life became a technical writer and now earn my money as a web software developer :woman_shrugging:.

1 Like

I’m an old (retired) man who has spent his entire life in the show. :wink:

Hey Christophe,

did the tagcloud code in the recipe above not help?