Joomla how to start with the CMS concept

All of us heard about joomla. So my friends has asked me to write a blog about how to start with Joomla.

Actually joomla is one of the most famous CMSs in the web development world. So here we got the concept of a CMS which is the acronym for Content Management System. CMS is more different from Framework. CMS is a complete system that simplifies the process of changing and editing large contents.
For developers it centralizes the processing and makes their codes more portable. It also enhances re-usability of code.

so let’s talk more about joomla.

Joomla have four main concepts:


-Template is something like a theme for your website.
-Modules is the heart of your website. you can have a login module, registration module…etc. Any Joomla website contains of many modules. Developers can develop any module and you can add it to any joomla website if it’s compatible with your joomla version. It provides code compatibility.

-plugins are some functions which are associated with specific triggers. when an event is fired all function with the same type associated with that plugin are executed.

-Libraries are some codes (or you can say packages) the extends the framework functionality. Libraries are considered the lowest level components specially for developers 😉

-Components are something that is considered a small app.s. To get it, imagine Joomla as a system and components as application running on that system. Components work with the MVC pattern.

Each of the previous will associated with a XML file that describes and identifies it.

In this post it’ll talk only about how to start authoring a Joomla Module.

First of all you must know the structure of a basic module

-The name of your folder must have “mod_” as the prefix of your module name
-a XML file that will hold some meta-data about your module like author name, module name …etc.

it consists of an extension tag which have 3 main attributes

1-method: install
2-version: the version of your Joomla
3-type : module

Then you’ll have some tags that will hold the details like

which is the name of your module
the name of the author (it is supposed to be your name :D)
Your copyright
and many other tags that is so easy to understand.

Then the most important tag is the
which holds any file associated with your module (even the php files)

like that

	<filename module="mod\_testmodule">mod\_testmodule.php</filename>  

-a PHP file that will do all the processing.
The name of this file must also have the prefix “mod_” followed by your module name or it will not be accessible.
This must include that line as the first line before any code is written

defined( '_JEXEC' ) or die; 

which means that no one can execute this file through the URL.

-empty index.html file for indexing issues.
-You may have a tmpl folder that will collect the data and generate html code to view the result.

Any basic Joomla module must have at least these requirements.

and here’s a demo module

To install any module package the folder as a .zip file
login as admin. “URL…/administrator/index.php”
Then choose extension tab->new Then browse and add the .zip file
Then you are done !

Hope you enjoyed !

Thanks 🙂