- mod_module_name.php
- mod_module_name.xml
To build a module in Joomla, several files are typically required. Here’s a list of the essential files:
- mod_example.php: This is the main PHP file for your module. It contains the logic and functionality of your module.
- mod_example.xml: This XML file defines the module’s parameters, settings, and metadata. It’s used by Joomla to install, configure, and manage the module.
- helper.php (optional): This file contains helper functions that may be used by the module. It’s not always necessary, but it can be helpful for organizing your code.
- tmpl/default.php (optional): If your module has a view, you may include a template file in the tmpl directory. This file contains the HTML markup and presentation logic for displaying the module’s output.
- language/en-GB/en-GB.mod_example.ini (optional): If your module includes language strings, you can define them in language files. This file contains English language strings for your module.
These are the basic files required to build a module in Joomla. Depending on the complexity and requirements of your module, you may also include additional files or directories for assets such as CSS, JavaScript, images, etc. It’s essential to follow Joomla’s coding standards and best practices while developing modules for compatibility and maintainability.