Shopping Basket

 x 
Cart empty


Popular Items

Find Us Elsewhere

Understanding Types of Joomla Extensions

What is the difference between a Joomla Component, a Module and a Plugin?

This issue can seem rather confusing to a novice Joomla user, but it is really worth understanding this, because each have their specific uses.

A component is often the most complex type of extension. It can be a sophisticated application in its own right, such as an e-commerce store or a social networking system. Typically a component will supply the main content of a Joomla page, will have its own database tables, and can be added as a menu item in the site navigation.

A module is generally a mini-application. It will not generally supply the main content of a page, but instead supplies extra, self-contained output typically in a small area of the Joomla page. It will not normally have its own database tables, but may be linked to a Joomla component, and draw its data from the component tables. Equally, a module may display output drawn from another site entirely, or may display custom code.

Joomla allows a number of module positions to be defined in the template file. These positions will vary according to the template, but typically include the left and right columns, the header and footer, plus a variety of other positions. A module can be assigned to one of these positions through the Joomla module manager, and then will be displayed in that position on some, all or none of those pages, according to choice.

A plugin is often used to modify the output of a Joomla component. It is a piece of code that will normally be executed when specific Joomla events occur: for example, a user logs in, or the content of a Joomla article is rendered. Plugins can be extremely flexible in the way they operate and can be a great way to extend the functionality of existing Joomla applications. There are eight core plugin types, each of which may trigger its own set of Joomla events. These core types are: authentication, content, editors, editors-xtd, search, system, user and xmlrpc.

However it is possible to define custom plugin groups, generating their own custom events, resulting in a very flexible system.

A common usage for a Joomla content plugin is to embed code in the format:-

 

{myplugin}

This is added to a Joomla article. When the article is rendered the plugin code will be replaced by the output of the plugin.

However this format is not compulsory, and content plugins can take many forms.

Components, modules and plugins can all support parameters, allowing the output to be customized. For a component, the parameters are usually specified for the menu item, using the menu manager. For a module, these are set through the module manager. You can normally have more than one instance of a module on the same page, each with its own set of parameters. Plugin parameters can be set through the plugin manager.