Feature No Code Attached Yet
avatar sinahaghparast
sinahaghparast
4 Apr 2024

Steps to reproduce the issue

Currently, each component can use com_categories once.

Expected result

If the com_categories is similar to the com_fields, by defining different texts (CONTEXT), it is possible to use the com_categories multiple times in the same component. Now the com_fields has such a capability.

Actual result

By changing one component, more scenarios can be covered.
For example Students MVC needs category, and Schools MVC needs category too.
context=com_example.students and context=com_example.schools

System information (as much as possible)

Additional comments

I've done this example for com_fields by adding numbers and was able to save a lot of coding. It is really similar to this scenario for com_categories, so that different scenarios can be covered with little coding.

avatar sinahaghparast sinahaghparast - open - 4 Apr 2024
avatar sinahaghparast sinahaghparast - change - 4 Apr 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Apr 2024
avatar sinahaghparast
sinahaghparast - comment - 4 Apr 2024

index.php?option=com_categories&view=categories&extension=com_content
*** change to ***
index.php?option=com_categories&view=categories&context=com_content.article


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

avatar richard67 richard67 - change - 5 Apr 2024
Labels Added: Feature
avatar richard67 richard67 - labeled - 5 Apr 2024
avatar Hackwar
Hackwar - comment - 5 Apr 2024

The parameter has a different name, but you can actually use the same structure right now. If you want, you can use &extension=com_content.fields to have an additional category tree. I'm doubting that we will rename the parameter, due to legacy reasons.

avatar sinahaghparast
sinahaghparast - comment - 6 Apr 2024

Please explain the old reasons. Maybe we can find a solution for it. I know that this can be implemented, but in my opinion, the code itself should be self-explanatory and not require trial and error by the developer.

avatar rdeutz rdeutz - change - 11 Apr 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-04-11 14:52:20
Closed_By rdeutz
avatar rdeutz rdeutz - close - 11 Apr 2024
avatar rdeutz
rdeutz - comment - 11 Apr 2024

Currently, each component can use com_categories once.

The first statement in you description is wrong. You can you use as much categories trees as you want, you only have to add something to the extension parameter like

extension=com_demo.tree1
extension=com_demo.tree2
extension=com_demo.tree3
extension=com_demo.tree4

Add a Comment

Login with GitHub to post a comment