I have been working on a component for quite some time now, it is meant to be more of link accessible library then a component though (its for form processing).

Basically it needs no settings to be added to the administration, so it needs no link, all settings are handled through modules and plugins.

Right now I use an install script to remove the link in the database, however I feel that is unclean, removing it from the database could in later version have an undesired effect, is there any nice way to do this other then the database? If not, is a component a bad idea for it? It could work as a library, it just needs to be able to handle GET requests.


Create a system plugin. In the plugin create a method onAfterRoute with this line:

JLoader::registerPrefix('Mylibraryprefix', __DIR__ );

So, in your plugin folder, put your libraries following the JLoader naming conventions. So you can instanciate your classes in anywhere in joomla.

| improve this answer | |
  • Thinking about it, system plugins can handle GET requests, so this is perfect. – Jordan Ramstad Apr 24 '14 at 23:26
  • Only potential issue would be if you need to have SEF urls, since the router relies on a component/menu combination. – David Fritsch Apr 25 '14 at 1:13
  • He can use the method onAfterInitialise – csbenjamin Apr 25 '14 at 3:11

Actually it sounds like you should create a library rather than a component. Since the bulk of your classes will only be used by modules and plugins. Which will have their own install zips.

Here is a link that shows how to set up the manifest

Use this tutorial to setup autoloading

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.