Create new Category from Article edit form#8623
Create new Category from Article edit form#8623pe7er wants to merge 16 commits intojoomla:stagingfrom pe7er:article-freecategory
Conversation
|
Is it always a root level category? |
|
Yes, that's right. |
|
Thanks for clarifying @pe7er just wanted to double check before testing |
There was a problem hiding this comment.
Instead of requiring the model and table we should use the relevent JModelLegacy::addIncludePath (https://github.com/joomla/joomla-cms/blob/3.5.0-beta/libraries/legacy/model/legacy.php#L81) and JTable::addIncludePath (https://github.com/joomla/joomla-cms/blob/3.5.0-beta/libraries/joomla/table/table.php#L319)
|
OK Several "smaller" comments and a "larger" comment (the plugin thing) but overall nice work. This is a really positive feature :) |
|
What about having a field "parent category" and a second field "child category"
thanks for this great feature! |
|
Without commenting on the code aspects that @wilsonge mentioned
|
|
Also what about the acl. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8623. |
|
Sorry me again Front end editing This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8623. |
|
Thanks for your constructive feedback @wilsonge ! |
|
Thanks for your feedback @designbengel ! Maybe we could add a message about that after creating a new category? |
|
Simple is always best |
|
Thanks for your feedback @brianteeman Thanks for your tooltip suggestion, I've added it to this PR. |
|
I've reproduced the front-end problem with this PR that @brianteeman reported. |
|
Please alpha order |
libraries/joomla/form/field.php
Outdated
There was a problem hiding this comment.
this stuff needs to go into the categoryedit.php file not in the global form field settings here :) Again look at JFormFieldPassword (it's the right code - just the wrong place!)
|
I have tested this item ✅ successfully on cf87097 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8623. |
|
Thanks for testing @Gerlof Thanks @infograf768 for your comment about this PR & ACL. |
|
This PR has received new commits. CC: @Gerlof This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8623. |
|
I've tested the issue with front-end ACL that @infograf768 described: |
|
I have tested this item ✅ successfully on c055379 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8623. |
|
I have tested this item ✅ successfully on c055379 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8623. |
|
I have tested this item ✅ successfully on c055379 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8623. |
|
@pe7er |
|
I have tested this item ✅ successfully on c055379 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8623. |
|
RTC - thanks This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8623. |
|
@pe7er |
|
Merged with b853b6b |
|
With a quick look at the code
so i decided to test this feature in 3.6.x Indeed the categoryedit form element does not check it How to test
The problem is that after checking the allowAdd attibute, |
|
Now if only this option was available on the frontend, communities could create all sorts of structures with this! |
|
@JoshuaLewis What could possibly go wrong!? ;-) |
|
If it was permission based (whether ACL or through a menu item) it could be managed through a select group of people via Joomla's user groups. If the easy creation of categories could be assigned to a parent category, someone attempting to wreck havoc wouldn't be hard to spot and wouldn't really mess up the site structure. |


Sometimes Joomla's workflow can be a bit confusing for new users:
Usually you have to create a category "X", create some articles that you assign to that category "X", create a menu item of type Category Blog to display the articles from category "X".
This PR adds a new functionality to the Article edit form that makes it possible to create & assign a new Category on the fly.
Huge thanks to @roland-d who helped me with developing this functionality at the Joomla Code Sprint at Roompot in Weert(NL).
Testing Instructions
Before the PR
Go to Content > Article
Create a new article (Title) and select an existing Category.
After the PR
Go to Content > Article
Create a new article (Title) and click on the Category dropdown.
The Category dropdown now has an option to add a new Category name.
Don't forget to click on to select your newly created Category.
The new Category will be on the bottom of the list, but only saved when the article is saved.