numero2 / contao-tags

Adds the possibility to assign tags to individual elements.
GNU Lesser General Public License v3.0
1 stars 3 forks source link

Improvement > Tags selected AND/OR #14

Open biowebfr opened 1 month ago

biowebfr commented 1 month ago

Hi, first, I have to say your extension is really great ! Thank you for that.

I use it on latest contao 5.3.11.

I've come to use the Tag Filter in News list. But It lacks something that could make this feature even more "powerfull".

When I tag filter like this :

Tag1, Tag2

The result list all news with Tag1, Tag2 and Tag1+Tag2

I want to tag filter my news using something like this :

"tag1, tag2"

So the result should list exclusively news with Tag1+Tag2.

Do you think it's possible to add this option in the tagfilter module ?

Thank you for your time and your work ;)

Renaud

bennyborn commented 1 month ago

I'm not sure but doesn't the option All tags must match in the newslist module do exactly this?

biowebfr commented 1 month ago

Oh! You're right.

In fact this option is present the Newslist module. And this is the one which I didn't notice and it's working as expected.

Thank you! :)

But I also saw this option in the News Tag Cloud module : image

Do you know what it's for?

bennyborn commented 1 month ago

This would filter the tags shown in the Tag Cloud depending on the "News tags" you pre-selected.

For example you checked "Tag2" and enabled All tags must match your Tag Cloud will only show this tag and tags from all other news articles that have at least "Tag2" set.

It's a bit complicated to describe but I'll guess you'll understand what it does if you got some more tags and news for testing 😊

biowebfr commented 1 month ago

I think I get it and this is a good feature ;).

I used to have https://github.com/hschottm/tags on Contao 3.5, I was very dispointed to see that it was not available for Contao 5 but yours seems to be very inspired from this one :).

So I checked the "All tags must match" in the Mod Tag Cloud but when I select the Tag3 that has only one match, others are still showing :

image image

As you can see Tag3 is only used once :

image

Am I finnaly don't get it that much? :p

Thanks a lot.

michb commented 1 month ago

The tag cloud modules can be filter by tags in the backend. As you can select multiple tags in the module configuration, e.g. under News tags, you can configure if all tags must match, speaking and / or comparision. But the tag cloud modules to not react to a selection in the frontend.

In your example the tag cloud will show all used tags in the select news archive.

biowebfr commented 1 month ago

Ok this one is tricky.

I try, please believe me but I can't understand what it means to do.

Here is 3 tests

Test 1 : image Result : image Select a tag : image

Test 2 : image Result : image Select a tag : image

Test 3 : image Result : image

I'm really sorry, but I don't get the logic behind these Tag Cloud module options.

Are those tests resultas ok for you?

bennyborn commented 1 month ago

Please keep in mind that the settings of the Tag Cloud module does not affect the listing of the Newslist module.

Lets go through your tests...

Test 1: You checked Ceci est le tag 1 so the Cloud makes sure to alwas show the tags of all articles having this tag

Test 2: You checked Ceci est le tag 1 and Tag2 as well as All tags must match so the Cloud shows the tags of matching articles IF there are news articles having BOTH of these tags

Test 3: You checked all 3 tags as well as All tags must match. Since there is no article having all three of these tags no tags will be listed at all