Tags and flex objects: no auto-complete? how do I best organise the tags? no tag cloud?

Hello everybody,

I am currently looking into the feasibility of doing a larger project with Grav. One of the stumbling blocks I’ve found so far is that tags do not seem to play as nicely with flex objects as I’m used to with pages.

The idea is to have several hundred (but no more than maybe a thousand) flex entries that feature a name, a location with geo coordinations, and some tags. I guesstimate that over those several hundred entries there may be 30 to 60 tags, possibly even more. I expect these to develop gradually along with the entries being added. I have noticed however that the tags do no autocomplete when I enter the beginning of an existing one. A quick check shows me that this definitely works in Grav 1.6 with categories for pages, but it does not work for categories or tags for either pages or flex objects in Grav 1.7, so I’m unsure whether it’s due to the flex objects or the latest Grav version, or possibly both. Does anybody know more about this?

Another thing I’m coming up short on (and I feel I MUST be overlooking something?!) is: how do I manage dozens of tags for hundreds of entries? If I have used one of these tags on 95 entries and I need to change it, how do I do that without editing every single one of those entries? Like… there must be an easier solution? But I can’t seem to find a plugin or anything. What am I missing?

Lastly it seems that the tag cloud plugin only grabs tags from pages, not from flex objects. I’m posting an issue for that in the plugin repository, but I think this may be related to the other points mentioned, so this may be interesting information.

So yeah, ideally I would have:

  1. autocomplete for tags in flex objects,
  2. a way to edit or delete a tag and have it update everywhere it is used,
  3. a tag cloud for tags on flex objects.

I’m super grateful for any ideas on how to accomplish this!

Hi Netzhexe!

I am an utter neophyte at Grav (and web dev more generally) but I have been thrown in the deep end on a project and have been wrestling with Flex Objects as well.

So I can’t answer your first question at all, although I have been able to use the default search to find objects with specific tags.

But as for bulk replace on tags – doesn’t flex just store this info back into the JSON file? My project’s objects are read-only, so I haven’t tested the CRUD stuff, but I thought that was the point of flex-objects.

So theoretically you should be able to load up the JSON file and do a simple search / replace to apply bulk changes to tag values. IDK though - let me know if this works. I’m curious.