Tag intersections page

I’m currently working with @bedhed in the preliminary stages of working on the bidirectional nav / Table of Contents features described here.

One slightly large piece missing from this work is a page which could display an ‘intersection’ of tags, (ie, topics which have both the ‘pr-welcome’ and ‘votes-friendly’ tags). A mockup is here:

Two questions:

  1. Is this a change that would be welcome / tolerated in core, if it were true that it didn’t change any existing functionality? (This strikes me as a change which is easier to make in core, rather than in a plugin)
  2. (if no) Are there folks out there that would be interested in this functionality as its own separate plugin, rather than bundled up with the Table of Contents stuff?
12 Likes

Thought I’d give this a slight bump. Would this be rejected from core if I made a PR for it?

1 Like

A PR for this is welcome! :heart:

8 Likes

I’ve put in a PR for this here:

https://github.com/discourse/discourse/pull/4387

11 Likes

Hmm I think we should be supporting multiple tags instead of just two here for this feature.

2 Likes

Okay, it does that now. :taco:

6 Likes

Good stuff! It’s merged.

6 Likes

Found :bug: :bug:

https://meta.discourse.org/tags/intersection/docker/email

Ember routing issue

  1. Go to Topics tagged docker & email
  2. Click Tags
  3. Select any tags
  4. Topic list is not filtered correctly
6 Likes

Cool, thanks; grabbing those now.

https://github.com/discourse/discourse/pull/4399

4 Likes

Yeah I fixed a few. We were both testing with show filter by tag enabled, so didn’t see some problems that appeared on meta. :blush:

6 Likes

I’ve been reading up on Tags and the ability to intersect multiple tags so that you can query posts on multiple tags. Just wondering where this is at? Is this functionality enabled? If yes, how do I incorporate this in a ‘Tags’ page?

1 Like

For further detail, this is what we are looking to do:

On the main “tags” page, we want to have a row for “parent tags”, which are essentially tag categories that other tags fall under. In our example, Parent tags would include “Syllabus Material”, “Exams”, and “Case Study”.

When you click on the Parent tag, all of the corresponding “Child tags” show up, and can be sorted by Count or Name. Here, Syllabus Material is selected as the parent tag, and “Topic 2” is selected as the child tag. Once a child tag is selected, it shows up in the box above.

Step 1:

Multiple child tags can be selected from each parent tag. In step 2 (below), “Exam 20” (Child tag) is selected from the “Exams” (Parent tag) section. This then appears at the box at the top.

Step 2:

Similarly, “Case Study Topics 2” (Child tag) is selected, and shows up at the top.

Step 3:

Finally, clicking the “Go” button queries all of the threads that have the selected tag combinations.

Step 4:

Please let me know if this is doable. Thank you very much!

1 Like

Are there any updates on this plugin? I really like the idea of intersecting multiple tags.

I would love that feature, too!

Especially I am interested in multiple drop down fields - one for each tag category. That way users can filter posts based on different “taxonomies” (Using the wp term here)

2 Likes

You can already do this using a URL in the form

https://yoursite.net/tags/intersection/tag1/tag2

You can then bookmark that URL or add it to a menu or whatever you like. It’s not quite as simple as a checkbox or dropdown, but it’s pretty straightforward for most users to take advantage of if they wish.

8 Likes

Thank you for the tip, I will definitely check it out.

1 Like

This is now a widget for the Layouts plugin:

2 Likes