Adding tags to kirbytext links to make them searchable and sortable

Hi I just want to ask if anyone would have an idea of what the best way to achieve adding tags to links would be in the textarea field. I.e.this would be aimed at then being able to have a separate page pull together all the different links from all the different textareas across the site and have the ability to sort them by their tags. So a link might have several tags describing its destination.

I’ve been looking at trying to customise the link button to this end as I’ve seen plugins like the enhanced toolbar link dialogue which offer greater control over the links. However I’m assuming that such a function would also require a custom kirbytag in order to allow the tags to be associated with the link rather than just piggybacking off the built in link tag.

Any pointers for this would be great as this is a function I’m keen to implement but don’t want to produce a hacky workaround to achieve it.


There are several parts to this:

  1. Creating a customized version of the default link kirbytag that accepts your additional attribute
  2. (optional) Creating a textarea extension that allows adding the tags in a dialog (so similar to the enhanced toolbar link plugin)
  3. Extract the links via some regex voodoo from the text fields

This is similar to what you want to achieve I think, only Kirby 2 based: Tagging URL --> Summary Page

Thanks so much! I’ll take a look through the link you’ve sent and see what I can figure out from it. Guess it might finally be time to try to learn some regex…

Resources like are a huge help when figuring out regex patterns