Just like the Component, Modules are built to extend Joomla’s functionality with third-party options.
To access the "Modules", Click "Extensions" and then "Module Manager", all the "Modules" in your Joomla site will be shown.
The modules shown are the default modules as built in Joomla and how these modules are positioned in the frontend makes your site appear the way you want it to. So two persons may use the same template but achieve different results.
- Creating a New Module
Modules can be created from components installed in Joomla. Or you can install an already made Module. Most of the items we see in the frontend are modules.
So let’s create a new module called "User Login" from the installed components in the site. There is a component already installed that we will access to enable us do this task.
- Click "Extensions" then "Module Manager".
- Click "New". In the next window, click "Login"
- Enter a Title for this Module eg. "User Login"
- Click Save & Close.
The module we just created won't appear at the frontend because we did not position it anywhere in the website. I will discuss a concept called "Module Positions" when we get to "Template Manager" shortly.
Module Positions will help us place our "User Login" form in the website. So let’s continue to the next topic. We will revisit the "User Login" Module.
- Module Positions
A module performs simple tasks and displays content as small blocks positioned around the page. Each module is located in a specific position, e.g. module “Main menu” is placed in position “position-7”. Each position is designed to occupy a place in a page’s layout, i.e. position “position-8” is placed on the left side of main content. Each template can have many different positions occupying various places on the page.
- To Preview Module Positions, you need to enable "Preview Module Positions"
1. Go to “Extensions” => “Template Manager” => "Options"
2. Next, set the parameter “Preview Module Positions” to “Enabled” and click “Save & Close”
3. Enable the preview of the module positions in the template by appending “?tp=1” to the web address.
This means type: http://localhost/JoomlaTraining/?tp=1 on your browser and press enter. Please refresh the page after changing this setting and you will have your site loaded with its module positions just like you have in the image below.
Now you can see all module positions of the template. This will help you to choose the right position when you add a new module.
What you need to do as an assignment is to position our "Login Form" into any position of your choice.