Global (editable) tags in panel possible?

Hi everyone.

What I’d like to achieve is a global source for tags. I read through the docs and found the following query.

 query: site.index.pluck("tags", ",", true)

I tried this query referencing another tag field which gave me the available tags from that field. So I set up a global tag field within my site blueprint and thought that I might be able to add the above query to every tag field, referencing the field name of this global tag field (siteTags).

Somehow my plan doesn’t work, though. I tried both with and without providing options in the global field. What I’m after is consistency with my tags throughout the site.

Is this even possible, or am I forgetting something? I’m guessing I would maybe have to alter the query, but don’t know in what direction.

Any hint is greatly appreciated.

If I understand you correctly, you want to define a set of tags in your site.yml that you can then query in other tags fields throughout the site?

What you query does, however, is query all fields named tag throughout all pages of the site.

So assuming you have this in your site blueprint

fields:
  siteTags:
    type: tags

Then you can query this field in other tags fields like so:

fields:
  tags:
    type: tags
    options:
      type: query
      query: site.siteTags.split

All documented here: Tags | Kirby CMS

Oh my. Thanks a lot @texnixe - I even read this article but somehow oversaw that specific point. I feel a bit silly. Sidenote: you were absolute right about what I’m trying to achieve.