Tag Icons working with tag groups

Wow, this is awesome!

Can this be expanded to work with tag groups? (All tags within a specific tag group would get a specific icon)

2 Likes

At this time, no, it can’t work with tag groups because the component doesn’t have access to the makeup of tag groups.

2 Likes

Okay. We have a large number of tags (over 200) but will only require 3 or 4 different icons.

Is there a way we could assign one icon for multiple tags, without having a separate row for each tag?

Let me know if this makes sense

Thanks!

1 Like

No, there is no way of doing that right now.

1 Like

Great plugin!

I agree with @fellowshipforums that being able to specify tag groups would be really nice. So you could have a tag group for cars, another for bikes, another for boats, etc, then each from those would get their respective icons. Otherwise we would have to manually set up potentially hundreds of tag icons manually…

3 Likes

The tag groups feature is a nice-to-have for sure, it is a bit tricky and currently I don’t have the time to work on it.

7 Likes

I just installed this lovely plugin and came here to add just this bit of feedback. :wink:

I can see it being tricky to implement though, not even knowing the technical issues. For example, I have tag groups for years, people, places etc that all sensibly could be given the same icon and color, but then also have other specific tags that will want their own specific icon and color.

4 Likes

As long as this feature is not available, I have found a workaround that allows me to configure the icons for all tags in a tag group more quickly. I use Data Explorer to generate a string, which I then simply paste into the settings field of the component.

The query I use to generate the configuration:

--[params]
-- string :tag_group_name
-- string :icon
-- string :color

WITH selected_group AS (
  SELECT id FROM tag_groups WHERE name = :tag_group_name
),
tag_ids AS (
  SELECT tag_id
  FROM tag_group_memberships
  WHERE tag_group_id = (SELECT id FROM selected_group)
),
tag_names AS (
  SELECT name
  FROM tags
  WHERE id IN (SELECT tag_id FROM tag_ids)
)
SELECT string_agg(name || ',' || :icon || ',' || :color, '|') AS tag_icon_config
FROM tag_names
4 Likes