Joomla Hello World Module
This post documents my experience while following the Creating a simple module Joomla 3.x tutorial. I am brand new to Joomla and wanted to share my experience for anyone else trying to develop, install and demo this module in their Joomla 3 environment.
After following the steps in the tutorial, you can compare your mod_helloworld files to the files I have pushed to github. Additionally, here is the file structure of the module.
Files
- mod_helloworld
- sql
- mysql
- install.mysql.utf8.sql
- uninstall.mysql.utf8.sql
- mysql
- tmpl
- default.php
- index.html
- helper.php
- index.html
- mod_helloworld.php
- mod_helloworld.xml
- sql
Install the Module
I created the module directly in the Joomla modules folder. For example,
*C:\xampp\htdocs\joomla3\modules\mod_helloworld*
Using XAMPP for Windows as my local Joomla development environment.
In this example, install the module as follows:
- Copy the mod_helloworld folder into the Joomla modules folder if it isn’t already there.
- In the Joomla Administration page (
/administrator
), navigate to Extensions > Manage - Select Discover from the sub menu.
- Select the Discover button.
- Check the box next to the Hello World module.
- Select the Install button.
]
Joomla 3.x Module Discovery Install
Add the module as follows:
- Navigate to Extensions > Modules
- Select the New button
- Under Select a Module Type: scroll down to the Hello World! module and select it.
- Fill out the mod_helloworld form, enter a Title, select a language and Position.
- Select the Save & Close button
Joomla 3.x Hello World Module Form
In this example, Bonjour tout le monde (Hello World in French) is displayed in position-1 at the top of the home page.
Joomla3 Home page with Hello World module