The best way to handle editable categories?

Hi there!

What would be the most elegant and future-proof way of handling categories (or tags or any kind of taxonomy) which can be renamed, added and removed through the Kirby panel, and displayed on the front end, for a multilingual site?

As far as I see, the options are:

  • creating subpages for categories and using Kirby’s built-in UUIDs for retrieving their names
  • using structure fields and custom-coding UUIDs for them
  • creating a category map and using it together with editing language variables from the panel in Kirby 4 (not user friendly for clients)

I know aspects of this have been covered here before but I think it would be useful to have an overview with recommended approach in one place. This was one of the main stumbling points for me when switching from a DB based CMS to a flat file one.

Thanks!

1 Like

I think using a structure field is probably the best approach, but maybe rather in a non-translatable structure field, with fields for each language or an object field inside the structure.

A translatable structure field has too many disadvantages, I think, as elements could be removed from one language but not the other etc, so hard to keep track. In that case, pages would be the preferable approach.

Another option could be a custom Panel area with an editable table (all translations in one row), then store this as json or so.

2 Likes

Good points, thank you!

I think it would be useful to have an overview with recommended approach in one place. This was one of the main stumbling points for me when switching from a DB based CMS to a flat file one.

I wholeheartedly second that. I’m trying to switch all my projects from WordPress and this is really keeping me up at night :sweat_smile:
At least it would be amazing to have a cookbook recipe for that, those have already helped me a great lot. And I find it hard to believe, that this is not a topic that is holding back a considerable amount of people from switching as this feature is so useful.

Thanks anyways for your amazing work!

Go upvote https://kirby.nolt.io/146 :blush: