Write a simple Joomla 1.6 module from scratch

Create you first Joomla 1.6 module completely from scratch.

Joomla, as of version 1.5 which was a complete rewrite is based on the MVC design pattern which makes creating modules extremely easy and structured. Joomla 1.6 changes a few things, the basics however remain the same.

Create a folder called mod_helloworld in modules
Create a mod_helloworld.php file
Create a mod_helloworld.xml file
Create a helper.php file
Create a template file tmpl/default.php
Discover new modules by going to “Extension Manager” -> “Discover”
The code for mod_helloworld.php

The helper.php file

Include the template file for the default view

The helloworld.xml file

Hello World!
Reinhold Weber
1.6.0
Reinholds simple Hello World module.

mod_helloworld.php
mod_helloworld.xml
index.html
helper.php
tmpl/default.php
tmpl/index.html

Create both index.html files to prevent direct directory browsing

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: