To create a simple module in Joomla 4 we will have to follow the following steps:
We will create a new directory called mod_example. In this directory we will create the first file named mod_example.php. This is the main file that will be accessed by Joomla and it will perform all the routines necessary to display the module.
In this file we will write the following source code:
<?php defined('_JEXEC') or die; use Joomla\CMS\Helper\ModuleHelper; require ModuleHelper::getLayoutPath('mod_exemplu', $params->get('layout', 'default'));
This module creates 3 animated counters to use on your site. A graphic file can be added to each aniation field. After each animated number you can add an additional sign, such as +, -, =, %, K, M etc. Also under the animated number you can write a line with explanations.
The module can also display a custom title.
This module has 3 different template styles. Screenshots with these templates are below:
This module display a company's program.
The hours can be selected individually for each day.
3 different models of templates can be used for displaying.
Also any day of the week can be set ass a day off.
Several display settings can be made by editing the css file related to the selected theme.