Index de l'article

Module - Joomla! Extension Directory Modules

A more lightweight and flexible Extension used for page rendering is a Module. Modules are used for small bits of the page that are generally less complex and able to be seen across different Components. To continue in our book analogy, a Module can be looked at as a footnote or header block, or perhaps an image/caption block that can be rendered on a particular page. Obviously you can have a footnote on any page but not all pages will have them. Footnotes also might appear regardless of which chapter you are reading. Simlarly Modules can be rendered regardless of which Component you have loaded.

Modules are like little mini-applets that can be placed anywhere on your site. They work in conjunction with Components in some cases and in others are complete stand alone snippets of code used to display some data from the database such as Articles (Newsflash) Modules are usually used to output data but they can also be interactive form items to input data for example the Login Module or Polls.

Modules can be assigned to Module positions which are defined in your Template and in the back-end using the Module Manager and editing the Module Position settings. For example, "left" and "right" are common for a 3 column layout.

Displaying Modules

Each Module is assigned to a Module position on your site. If you wish it to display in two different locations you must copy the Module and assign the copy to display at the new location. You can also set which Menu Items (and thus pages) a Module will display on, you can select all Menu Items or you can pick and choose by holding down the control key and selecting multiple locations one by one in the Modules [Edit] screen

Note: Your Main Menu is a Module! When you create a new Menu in the Menu Manager you are actually copying the Main Menu Module (mod_mainmenu) code and giving it the name of your new Menu. When you copy a Module you do not copy all of its parameters, you simply allow Joomla! to use the same code with two separate settings.

Newsflash Example

Newsflash is a Module which will display Articles from your site in an assignable Module position. It can be used and configured to display one Category, all Categories, or to randomly choose Articles to highlight to Users. It will display as much of an Article as you set, and will show a Read more... link to take the User to the full Article.

The Newsflash Component is particularly useful for things like Site News or to show the latest Article added to your Web site.