Skip to content

[6.0] New module - Category Tags #38752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 83 commits into
base: 6.0-dev
Choose a base branch
from

Conversation

korenevskiy
Copy link
Contributor

@korenevskiy korenevskiy commented Sep 13, 2022

Actual result BEFORE applying this Pull Request

Previously, the display was very restrictive. Tag links opened the tag component. But the problem is that the Tag Component does not have a mode for displaying articles as a blog. At the same time, the display of the list of materials of one tag must be made additional layout.

Expected result AFTER applying this Pull Request

The new module allows you to display tags in the form of a tree, This will allow you to use tags to display as a catalog of categories. Every developer faces a problem when an article needs to be placed in 2(3) different categories at once. For example, an article can simultaneously contain future news, as well as an article can contain information about the PHP language, as well as contain information about gifts. By opening the module tag link, a list of blog materials will be displayed.

While deleting the material tag, the material link remains the same. But if we moved an article from one category to another, the article link would change. Now the article link will remain the same, and tags can be used instead of categories.

image

image

Functions

  1. If 2 articles are marked with the same tag, but are in different categories. Then one tag will be shown in the display 2 times. Since both are the same, but differ by reference to different categories. Which is quite logical to show 2 times.
  2. If tags are displayed in tree mode and display category names , then category names will be displayed only for parent tags. This will allow you to show groups of tags by different group categories, since in any case there will be tags of only one category in one branch.
  3. If you want the tags to be displayed without grouping by category, then you should not specify more than one category in the settings, which is also quite logical.
  4. List mode, nothing special. Everything is intuitive, works like a list.

Accordingly, it is necessary to test 1-3 items.

.

Future

Perhaps in the future, for the BLOG component, you can add a display in the title of the tag name for which the BLOG and image are displayed.

Possible problems

A known problem.
After clicking on the tag links, the Category, Blog component stores this tag in the cache, and later, when opening any Category and Blog links, materials with the last open tag will be displayed.

A quick solution to the problem.
In the link settings in the component menu, in the tag selection field, you must specify the selection of an empty tag. This will allow you to open links by resetting the tag filter in the cache.

The required Solution to the problem.
It is required to make changes to the code of the Category and Blog component so that links without the selected tag reset the tag filter in the cache.

Should the module be able to: (One to choose from.) Answer the question.

  • The module shows tag links only for the selected menu item.
  • The module is able to show tag links not only for the selected menu item. And also show the link without the presence of a menu item.

But we must take into account that another module, "List of materials", shows links without linking to menu items.

Download This module.
https://korenevskiy.github.io/mod_category_tags/mod_category_tags.zip

@korenevskiy korenevskiy requested a review from chmst as a code owner September 13, 2022 19:15
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.3-dev labels Sep 13, 2022
@korenevskiy korenevskiy changed the title [J4] New module - Category Tags [J4.3] New module - Category Tags Sep 13, 2022
@korenevskiy
Copy link
Contributor Author

korenevskiy commented Sep 13, 2022

FUNCTIONS

  1. If 2 articles are marked with the same tag, but are in different categories. Then one tag will be shown in the display 2 times. Since both are the same, but differ by reference to different categories. Which is quite logical to show 2 times.
  2. If tags are displayed in tree mode and display category names , then category names will be displayed only for parent tags. This will allow you to show groups of tags by different group categories, since in any case there will be tags of only one category in one branch.
  3. If you want the tags to be displayed without grouping by category, then you should not specify more than one category in the settings, which is also quite logical.
  4. List mode, nothing special. Everything is intuitive, works like a list.

Accordingly, it is necessary to test 1-3 items.

@laoneo
Copy link
Member

laoneo commented Sep 14, 2022

I really appreciate your efforts, but this module would be a perfect fit for the extension directory.

@korenevskiy
Copy link
Contributor Author

korenevskiy commented Sep 14, 2022

I really appreciate your efforts, but this module would be a perfect fit for the extension directory.

99% of developers need the functions of this module. But as in any other module, all the functions of each module are used by 20%. We can make the default values simple, disable the tree mode by default. Would you personally use such a module?

In any case, opening tags in the form of a blog is a very useful feature. Otherwise, working with tags is not convenient in principle.

Even in the blog category component there is a tag selection setting. Thus, the module works similarly to the function of the Blog Category component.

We can simplify the selection of a category to the selection of a single category. In this case, there will be no more duplicate identical tags.

@bembelimen
Copy link
Contributor

Hey @korenevskiy we had a long discussion in the maintainer team and would like to see something like your module in the core. But as we currently go the way "one module for all" could you do the same and integrate the mod_tags_popular and your model to a new one?

@brianteeman
Copy link
Contributor

For consistency with other modules shouldnt this be called "Tags - Categories" and the files renamed accordingly to mod_tags_categories.

Also as these are new files then the copyright should be 2024 (now - sorry its taken so long that this needs to be changed)

As this is a new module then it needs to be added to the install sql and the update sql

It also needs to be added to the list of core modules here

// Core module extensions - site

@brianteeman
Copy link
Contributor

oops cross posted with @bembelimen

@Quy Quy added the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Aug 9, 2024
@pcombet-adosis
Copy link

I have tested this item 🔴 unsuccessfully on f95b0da

Hello tested it but unsuccessfully. Tested in multilanguage environment FR/ENG.
Used Casiopeia, affected tag1, tag2, tag3 to 3 different articles, in different categories (Typography & Blog default Joomla categories after fresh install). When displaying my article n°1 with tag1 (category Typography), the side module does NOT display the others categories which have different articles with the same tag (tag1 in blog category for example).
Moreover the module is missing the language ENG file, I'm having all the texts in MOD_CATEGORY_TAGS_FIELD_DISPLAY_TREE_LABEL format. Not easy to understand different options.

Please provide a precise walkthrough to install and configure module for successful replication.
Best
Philippe


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38752.

@pcombet-adosis
Copy link

Hello tested it but unsuccessfully. Tested in multilanguage environment FR/ENG.
Used Casiopeia, affected tag1, tag2, tag3 to 3 different articles, in different categories (Typography & Blog default Joomla categories after fresh install). When displaying my article n°1 with tag1 (category Typography), the side module does NOT display the others categories which have different articles with the same tag (tag1 in blog category for example).
Moreover the module is missing the language ENG file, I'm having all the texts in MOD_CATEGORY_TAGS_FIELD_DISPLAY_TREE_LABEL format. Not easy to understand different options.

Please provide a precise walkthrough to install and configure module for successful replication.
Best
Philippe


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38752.

@HLeithner HLeithner changed the base branch from 5.2-dev to 5.3-dev September 2, 2024 08:53
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 5.3-dev.

@HLeithner HLeithner changed the title [5.2] New module - Category Tags [5.3] New module - Category Tags Sep 2, 2024
@Hackwar Hackwar removed the PR-5.2-dev label Sep 3, 2024
@korenevskiy
Copy link
Contributor Author

korenevskiy commented Sep 11, 2024

Hello tested it but unsuccessfully. Tested in multilanguage environment FR/ENG. Used Casiopeia, affected tag1, tag2, tag3 to 3 different articles, in different categories (Typography & Blog default Joomla categories after fresh install). When displaying my article n°1 with tag1 (category Typography), the side module does NOT display the others categories which have different articles with the same tag (tag1 in blog category for example). Moreover the module is missing the language ENG file, I'm having all the texts in MOD_CATEGORY_TAGS_FIELD_DISPLAY_TREE_LABEL format. Not easy to understand different options.

Please provide a precise walkthrough to install and configure module for successful replication. Best Philippe
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38752.

Understand that the module does not affect multilingualism in any way.
There is a basic component of Articles and a blog. By creating a blog or articles menu item, you can specify the article display tag.
The menu item of this component is formed by the item for this component.
This new module forms exactly the same component reference. The module does not affect the component in any way.
If you do not display the articles of the component, it means that the component itself is not configured, or the tags are not configured.

Please tell me more precisely in which folder and which file is missing for the language.

@korenevskiy
Copy link
Contributor Author

Hey @korenevskiy we had a long discussion in the maintainer team and would like to see something like your module in the core. But as we currently go the way "one module for all" could you do the same and integrate the mod_tags_popular and your model to a new one?

@brianteeman
The fact is that the module externally shows only tags in the form of a tree or list. But the fact is that the link addresses of these tags point to the Category component. Therefore, in fact, this module still applies more to the Category component than to the tag component.
@pcombet-adosis I do not know what to call him correctly. Tell me please. But I wrote categories in the title only because the module opens the categories component.
And since links open another component, this should not confuse the user so that he does not confuse with standard tag modules. We must explicitly indicate that these are links to another component.

The team's decision was correct, that it is impossible to produce unnecessary modules. But this module is superficially similar to mod_popular_tags, but completely different in targets.

Copy link
Contributor Author

@korenevskiy korenevskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update create year

@HLeithner HLeithner changed the base branch from 5.3-dev to 6.0-dev March 4, 2025 17:22
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 6.0-dev.

@HLeithner HLeithner changed the title [5.3] New module - Category Tags [6.0] New module - Category Tags Mar 4, 2025
@rdeutz rdeutz removed the PR-5.3-dev label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Language Change This is for Translators PR-6.0-dev Updates Requested Indicates that this pull request needs an update from the author and should not be tested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.