When writing new blog articles I would like to see existing tags from older articles.
I have tried it with this code in the blueprint but it doesn’t work (nothing is showing up):
For existing articles, it is possible with this code to add more tags by using autocomplete but not with new articles.
How to show a list (structure) with all existing tags for new articles or at least being able to use the autocomplete in a tags input field?
Additionally it would be great to have independend page in the panel where it is possible to manage all the existing tags.
which only worked for existing articles. Later I have changed that to the mentioned
site.index.pluck("tags", ",", true)
which solved the autocompletion problem with the input tags field.
But in the Structure field I don’t see a pre-populated list with existing tags:
I would like to have an overview of all existing tags so that I can choose easily which of them fit to the new article.
I didn’t find it somewhere, I just tried things out as I am new to Kirby.
Exactly, I just want to get an overview of all existing tags so that I can choose if some of them fit to a new article.
Something similar like this (from Ghost CMS):
Hm, but you would have to update this field all the time when new tags are created. It would probably make more sense to use an info field with a custom method that fetches and displays those tags.
That’s why I said you need a custom method that outputs a list of the tags, site.index.pluck("tags", ",", true) returns an array and you cannot echo an array.
So your method would loop through that array and return a string.
That doesn’t make sense, you return the page object. Whereas your method would have to return an string, e.g. an HTML list with a li element for each tag.