How to create tag structures, tag category restrictions, tag groups and tag relationships

Good to know.:grinning:

Hi there,

I’d like to discuss a confusing behaviour I’ve observed while poking around with tags and parent tag (on a hosted instance). Maybe it’s just me, but I’d rather check:

  • I’ve defined a Governance tag group, which contains the pdf_report tag , and which has governance as a parent tag
  • when I create a new topic, the tag auto-complete does yield pdf_report, although I haven’t set the parent tag (me starting to be confused here)
  • upon setting this pdf_report tag and creating the topic , the tag is actually not persisted on the topic (makes sense since parent is missing, but confusing wrt previous topic creation)
  • on editing the topic title, the tag auto-complete no longer suggest the child tag, I need to set the parent first (expected behaviour)

I find this quite confusing from a UX perspective. Is this a known area of improvement ? If I had one suggestion to make, it would be that I do see some value in auto-complete suggesting all possible tags (for user education/awareness), but in case one tag has an explicit parent, then the parent should be set at the same time.

(let me know if screenshots are needed to help with repro of above scenario)

4 Likes

This sounds like a regression caused by the rewrite of the tags input field. I’ll have a look.

5 Likes

I found the bug and fixed it. The tag input wasn’t supposed to be showing those tags without the parent tag being present, as you said.

13 Likes

A post was split to a new topic: Educating users about tags

9 posts were split to a new topic: Questions about creating, uploading, editing tags

Hey, thanks for this tuto !
You talked about restricting Tags to a certain category, but is it possible to restrict Tags to a certain Sub-Category ?

For example :

tags

With Tag 1, 2 and 3 only visible if I’m in Sub-Category 1

Yes, it’s the same for sub-categories. Go to the sub-categories’ settings and change the tags there.

6 Likes

If I have sub-category per Make, can a topic auto-tagged by the sub-category name.For example, if I post something in honda the tag honda will be automatically added, allowing the user to select the right model straight away.

There’s no way to do that without a plugin. In your example, you don’t need the make tags if you have make categories. Use only the corresponding model tag group on each subcategory instead.

1 Like

So I know what I would have to do. When I get related topics right, the code of the plugin is simple, meaning not that many lines to write, isn’t it?

I want to make these topics available in another context, so they have to ne tagged according their category and subcategory

So you mean to post in the category not in the subcategory and use tags instead of the subcategory?

There’s a plugin that does something similar that you can reference:

https://github.com/discourse/discourse-unhandled-tagger

I was saying that if you have a “Mazda” (sub-)category, then I don’t see why you also need to apply a “Mazda” tag to all topics in the “Mazda” (sub-)category. But you say you need it for another context, so fair enough.

6 Likes

Tag group titles should be clickable. When guiding users to use a category specific tag group, I can’t send a link and show them that tag group.

5 Likes

I’m looking to create tags that only admins can create like “Product Announcements”. This area of “Staff tags” looks like it would help but when I search in settings I don’t get any results.

1 Like

Look for min trust to create tag.

3 Likes

Is it possible to automatically apply a tag to all posts within a category? The reason for this is that I wanted to use the tag intersections page for applicable tagged posts within a category, but right now I can only filter via tags, but category. I like how clean the intersection page looks so didn’t want to workaround using the search function. Thank you!

You can already filter by category + tag if you enable the “show filter by tag” setting.

3 Likes

Understood. My use case is to filter by a category + 3 tags though. Thank you!

Hi all,

Either I’ve stumbled upon a bug or I’m missing something obvious. I have about a 150 tags to associated under a group, so I’m trying the CSV method. I’ve tried virtually every combination to meet the modal requirement of “‘tag_name,tag_group’” and nothing works. Every upload results in a single tag of: tag-name-tag-group with no grouping.

I’m hoping someone else can test to see if it’s a bug, or at least provide an example CSV screenshot to see what I could possibly be missing.

Thanks!

2 Likes

OK, so my last gasp attempted was to create my own plain txt file and name it .csv and it worked! As a heads up, Excel and Google Sheet ‘Save As’ CSV did not work.

4 Likes