I think there is not such an option atm.
Also it would open up some questions: What if your tags field isnāt actually called ātagsā? What if you use a different separator than ā,ā?
That needs to go into /site/fields, in this case into a folder ācategoryā, because that is the name of the field. If you change the name of the field, you also need to change its folder name.
@lukasbestle: You are right, there are, in fact, a few related topics, e.g. querying a structure field. Thatās why an official feature would be great. But unfortunately, we cannot always sit and wait for a feature if we have to get a project out into the world
Hi,
Iāve tried to use your example to fetch all the tags of all the site pages, but Iām struggling to traverse all the pages of the site: foreach(kirby()->site()->tags()->split() as $allmytags)
return only the tags from the āsite.txtā file
foreach(kirby()->site()->pages()->tags()->split() as $allmytags)
return a null error
foreach(kirby()->site()->page()->tags()->split() as $allmytags)
return only the āhome.txtā content (which is a starterkit content for now)
How can I traverse all the pages of the site within a custom select field in order to fetch all the fields tags ?
Sorry, itās been a while, but I am still looking for a way with select / multiselect (using @distantnativeās plugin) fields to choose from all tags there are. Any suggestions as of 11/17?
Thanks very much and sorry for reviving this old post, but posting a duplicate would be worse
So, that would be generating a JSON array and populating it with all tags on the page ( something like this: foreach ($page->index()->tags()->split as $globalTags), right? So, basically for tags that would āonlyā be their title, or am I mistaken?
// Edit: While Iām on it: Is it possible to (automatically) create a subpage for each tag, with a URL like example.com/tags/individual-tag ⦠I donāt especially like the tag:individual-tag structure from the docs ā¦
No, you canāt use parameters in the route, that will be ignored, this should work the other way round, i.e. the route pattern should be the URL that you want to have, like tags/some_tag and then the action returns whatever you want to return from that route, i.e. a filtered collection.