Module Manager in Joomla

So what is a module? Simply put, it is a collection of several related items. For example, a module can be a collection of any of the following:

  • Menus
  • Popular articles or related articles
  • Advertisements, banners, or random images

The main benefit of collecting several related items in a module is to gain better control. For example, you can make a module become invisible on the web site (which would be easier than unpublishing the individual items), apply a CSS style uniformly to all items in a module, change its access level or position, and so on.

Joomla provides the following front-end and back-end modules:

  • Site modules: The modules for the front end of the system are called Site modules, and there are 24 different Site module types. These modules configure the site for the site
  • Administrator modules: The modules for the back end are called Administrator modules, and there are 15 different Administrator module types. These modules enhance the administration interface and provides desired information to the The administrator can customize the site’s admin interface using the administration modules.

You can always add more site modules by using the Module Manager. You can also use the Module Manager to customize the desired module(s). When you open the Module Manager (by selecting Extensions ➤ Module Manager), the list of Site modules in it is displayed, as shown in Figure 8-1.

These modules are those visible on the Site link. After the Administrator link is selected, the Administrator modules will display, as shown in Figure 8-2.

However, if you look at the Type column that displays the type of module to which the module belongs, you’ll observe that several modules belong to the same type. Figure 8-3 shows the different Site module types provided by Joomla.

Similarly, Figure 8-4 shows the Administrator module types provided by Joomla.

Note      You can also make your own modules that belong to an existing module type. A module type name is a sort of system name for the module. You cannot edit the module type name of any module.

Table 8-1 lists the different module types and their purposes.

Note that although all the modules you will look at in this chapter have the same fields in the Module, Menu Assignment, and Module Permissions sections, they have different Advanced sections.

Open the Module Manager by selecting Extensions ➤ Module Manager. You’ll see a list of modules, as shown previously in Figure 8-1. Using the Module Manager, you can add new modules, edit existing modules, delete undesired modules, and more.

If you click the name of any module, it will open in edit mode. For example, click the Archive module, and its edit page will open, as shown in Figure 8-5.

The settings displayed are divided into four sections: Module, Menu Assignment, Module Permissions, and Advanced. Again, all the module types have the same settings in the Module, Menu Assignment, and Module Permissions sections; the only difference is with the Advanced section options. The next section discusses Module section options.

1. Module Section

In the Title field, you enter the title of the module. For this example, enter Archived Titles, which is the name that will appear in the Module Manager. Set the Show Title option to Yes to see the title displayed on the front end. Set the Status option to Published to make the module visible on the web site. The Position drop-down list is used to specify the location of the module on the web page. The positions in the drop- down list are provided by the template you use and appear as shown in Figure 8-6. For this example, keep its default position: position-7.

You can easily display all the default positions provided by the current template on the web page by simply adding the text ?tp=1 to the end of any front-end Joomla URL. For example, the web site URL is http://localhost/joomlasite/, so if you type the URL as http://localhost/joomlasite/?tp=1, you will see the web page displayed with labeled rectangles that indicate the predefined positions for the current template (see Figure 8-7).

Note      If the positions are not displayed, open the Template Manager. Click the Options icon from the toolbar and set the Preview Module Positions field to Enabled value. By default, its value is Disabled.

The Ordering drop-down list in the Module section (refer to Figure 8-5) is used to specify the display sequence if more than one module is assigned the same position. You can actually set the order of a module to appear in the ordering dialog box as well as the Module Manager main page just by clicking the up/down arrows. The module positions are decided by the template that you applied to your web site, and a template may specify the same position to several modules. For example, suppose that the Main Menu and Login Form modules have the same position (defined in the current template). In this case, the value in the Ordering drop-down list decides which will appear first on the front end. The drop-down list shows all modules being assigned the current position. You can select the module after which you want the current module to appear. The order can also be changed later from the Module Manager.

For this example, keep the default order (i.e., keep the value of this field unchanged so that the modules are displayed in the default sequence).

The Access Level field is used to specify the user level allowed to access this module. The access levels are as follows:

  • Public: Everyone can access this module.
  • Registered: Only registered users can access this module.
  • Special: Only users with author status or higher can access this module.

For this example, set the Access Level to Public because you want the module to be publicly viewed.

2. Menu Assignment Section

The Menu Assignment section is used to determine the web pages on which the current module is to be displayed. You can make a module appear or disappear by selecting certain menu items. The Menus option is used to determine the menus in which you want to display the module. The options are as follows:

  • All: Displays the current module on all menu items of the web page. Choose this option for this example.
  • None: Makes the module invisible (not displayed on any menu items).
  • Select Menu Item(s) from the List: Displays the module on only selected menu items.

The Menu Selection list is used when Select Menu Item(s) from the List is selected. It helps when selecting individual menu items on which you want to display the module. You can Ctrl+ click to select multiple menu items and Shift+ click to select a range of menu items.

Note      Although the Menus option for a module is usually set to None by default, set it to All for all the modules that will be discussed in this chapter to make them appear on all menu items of the web page.

Now you’ll look at each module in turn. Because all the module types have the same fields in the Module, Menu Assignment, and Module Permissions sections, only the fields of the Advanced section for each module will be discussed. Likewise, one example module per module type will be discussed because all the modules of a particular module type work according to the same concept.

3. Archive

The Archive module shows articles that have been archived (temporarily removed from active display and stored). This module displays nothing if no articles are archived. If an article is archived, it is stored by creation date, not by archive date, and the module displays the month and year of creation. This module and the menu item type Archived Article (discussed in Chapter 7) work in a similar fashion.

In the Module Manager, when you select the Archive module, it opens in edit mode. By default, the Module section opens up as shown in Figure 8-5. The # of Months is for specifying the number of calendar months containing archived articles to be displayed. The default value is 10, but you can set it to any value that you want. The fields in its Advanced section are as shown in Figure 8-8.

The Module Class Suffix field allows you to specify a preset style that is defined by the template. Also, this field is used when you want to apply your own CSS class to certain modules, independent of the site’s default template CSS classes. CSS classes are for applying your own styles (font, color, and so on) to the modules of your web site in a consistent manner. To do this, create CSS classes in the template CSS file and specify its name in this field. Suppose that the class name is module-archive; if you enter its suffix, -archive, in this field, its styles will be individually applied to the Archive module. Click the Save & Close icon from the toolbar to save the changes made in the module.

Upon opening the front end of your Joomla web site, you’ll see a link with the title Archived Articles, indicating that some articles created in January 2011 and December 2010 have been archived. If you click the January 2011 link, you’ll see all the archived articles that were created in that month and year, as shown in Figure 8-9.

Source: Harwani B M (2015), Foundations of Joomla!, Apress; 2nd ed edition

Leave a Reply

Your email address will not be published. Required fields are marked *