Creating Components for Joomla

I recently learned how to create a component for Joomla using this tutorial . It was surprisingly easy. The only thing I would add is the following:

  • What would normally be your index.html file is now the name of your component. For example, if your component is called 'my_component' then that is also what your main file will be called, 'my_component.php'
  • It is not necessary to have admin files in your component although it seems necessary to have the menu items
  • It also seems necessary to create a corresponding table in the database for your component whether it needs it or not. I always received errors whenever I deleted the sql query in my xml file.
  • Also, remember that you don't need html tags like <HEAD> or <TITLE> since your main file will be included in the overall template.

Using components makes your code more secure (since it uses the Joomla! security model) and configuration management is simplified.

NOTE: Link updated!
UPDATE: As that link is very old, I would suggest following the tutorial on the Joomla! Wiki. It's pretty straightforward.