Search code examples
joomlajoomla1.5joomla-component

Where to Place Custom Classes in Joomla (Component, Plugin, Module?)


I am new to Joomla (a seasoned WP dev) and I have just barely managed to wrap my head around the components and the plugins.

The thing is, that I want to include a shared component (a class), that should be callable from both the component and the plugin.

Any ideas? A library maybe? Can I bundle a library in a Joomla installer Package in this case?


Solution

  • If you create a lib_yourlib.xml file in the root directory and specify :

    <extension type="library">
    <files folder="yourlib">
    

    it should be installable like any package, and it will be copied in libraries/yourlib after installation.