Blog

Coding Joomla! "Next" - Multi-Category Assignments

An often requested feature of Joomla! (at least in the year and a half I've been hanging around ;-) ) is the ability to assign articles to multiple categories. Well, the code isn't going to write itself, so if we want to see that feature in six months with the next release, now is the time to start!

Coding A Feature

Coding a feature and getting it included into the core Joomla! distribution is not an easy task. It requires developers to write the code and users to test the code along the way. Feedback is very essential, especially when it pertains to the user interface. For a feature of this magnitude, which will require some unique changes to com_content and the database structure, it is even more important that the feedback is there and that instead of several developers creating multiple solutions, the ideas are pooled into a single location so that a single (and hopefully the best) solution can be presented for inclusion.

So Where Do We Start?

As of a little while ago, there is now a feature request on the Joomlacode Feature Tracker. To repeat what is said there, this is how I'm envisioning opening the door to contributions:

  • SVN Branch - Rebased off the current trunk is my SVN branch, located at http://joomlacode.org/svn/joomla/development/branches/mbabker (Username: anonymous and no password or use your Joomlacode credentials). In the branch I've already made a couple of basic changes that need to be done to allow multiple categories to be selected in the back end edit view, have the array of ID's JSON encoded, and saved to the database. At the branch root is also a TODO file with a list of changes that will need to be made (obviously, it's not a complete list at the moment).
  • GitHub repo - In the chance case that platform changes will need to be made (at the moment, I'm not too sure of this), I've created a branch on my platform fork for these changes. The branch is on GitHub at https://github.com/BabDev/joomla-platform/tree/multicat (along with the appropriate clone URL's for those new to Git). For the sake of sanity and keeping all code in one place until it is ready to be pushed to the platform, I ask that pull requests be issued to the multicat branch on my fork. As code is committed on the SVN, I'll commit it to my Git branch as well to try and keep the two in sync.
  • System Tests - A goal for Joomla! is to have system and/or unit tests for all code as appropriate, so if writing these tests is your specialty, we need your help also.

Lets Get Started!

We're still 11 days out from the Joomla! 1.7 release, but what's to stop us from starting the next release's features now? If you want to contribute, check out the repos and start writing some code (testers, we need you too, but not just yet)!