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
    • tmpl
      • default.php
      • index.html
    • helper.php
    • index.html
    • mod_helloworld.php
    • mod_helloworld.xml

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:

  1. Copy the mod_helloworld folder into the Joomla modules folder if it isn’t already there.
  2. In the Joomla Administration page (/administrator), navigate to Extensions > Manage
  3. Select Discover from the sub menu.
  4. Select the Discover button.
  5. Check the box next to the Hello World module.
  6. Select the Install button.

Joomla 3 Module Discovery Install]
Joomla 3.x Module Discovery Install

Add the module as follows:

  1. Navigate to Extensions > Modules
  2. Select the New button
  3. Under Select a Module Type: scroll down to the Hello World! module and select it.
  4. Fill out the mod_helloworld form, enter a Title, select a language and Position.
  5. Select the Save & Close button

Joomla 3.x Hello World Module Form
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
Joomla3 Home page with Hello World module

comments powered by Disqus