Contents
Joomla
A popular CMS: developing modules, plugins and components, layouts and database access.
1.Getting started
- Introduction to JoomlaWhat Joomla is, which version the course targets, how to install it on your computer and turn on debug mode.
- Site foldersHow a Joomla site folder is organised: the visitor side and the administrator side, where extensions, settings and database tables live.
- Core conceptsWhat a Joomla site is made of: articles, categories, menus, module positions, components, plugins and templates — and how a page is put together.
- Extensions and the manifest fileTypes of Joomla extensions, naming rules, the XML manifest file and two ways to install: from an archive and through Discover.
2.Modules
- The first moduleCreating a Joomla module from scratch: the manifest, the service provider, the dispatcher and the layout. Installing the module and showing it in a template position.
- The module helperThe Helper class in a Joomla module: where it lives, how to get it in the dispatcher and how to select the latest articles from the database for the layout.
- Module parametersJoomla module settings: how to describe fields in the manifest, where the administrator fills them in and how to read the values in the dispatcher.
- Layouts and overridesLayout files in the tmpl folder, a second selectable module layout and overriding a layout in the template html folder without editing the extension.
- Styles and scriptsThe Web Asset Manager in Joomla: where to put the CSS and JS files of an extension, how to load them in a layout and describe them in joomla.asset.json.
- Language filesTranslations in a Joomla extension: ini files in the language folder, keys, output with Text::_, value substitution and translating labels in the manifest.
3.Plugins
- The first pluginWhat events are in Joomla and how to write a content plugin: folder structure, manifest, provider, a class with SubscriberInterface and parameters.
- Plugin groups and eventsWhich plugin groups Joomla has, which events happen during a request, an example of a system plugin and of a user plugin.
4.Component
- Component: structure and entry pointWhat a Joomla component consists of: the site and administrator folders, the manifest, the service provider and installing through Discover.
- Controller, view and layoutThe first page of a Joomla component: DisplayController, the HtmlView class and a layout in the tmpl folder. How the request address maps to class names.
- ModelsModels of a Joomla component: a table for posts, the ListModel list model, the ItemModel single-record model and calling a model from a view.
- Database queriesThe Joomla query builder: how to get the database object, build a SELECT with conditions, bind values safely, read the result and change data.
- A list in the control panelThe administrator part of a Joomla component: the controller, model and view of a post list, the toolbar and the adminForm form.
- Tables and saving dataSaving records in a Joomla component: the Table class for a table row, the AdminModel model, the FormController controller and the edit screen.
- FormsJoomla forms in XML files: field types, required fields, validate rules, filter attributes and rendering fields in a layout.
- Access controlPermissions in a Joomla component: actions in access.xml, the config.xml options screen, authorise checks in code and view levels.
- URLs and menu itemsLinks to component pages with Route::_, a menu item type in the default.xml file and what readable SEF URLs require.
5.Template, API and console
- A site templateJoomla template basics: the templateDetails.xml and index.php files, jdoc:include tags, module positions, loading styles and child templates.
- The Web Services APIThe Joomla API: built-in endpoints and the access token, a webservices plugin with routes and the api folder of a component with a controller and a view.
- Console commandsThe Joomla console: built-in cli/joomla.php commands, your own command in a console plugin and running the scheduler from cron.
6.Releasing an extension
- SQL files and the install scriptWhat runs when a Joomla extension is installed: SQL files that create, update and drop tables, and the install script class.
- Archive, package and update serverPreparing a Joomla extension for distribution: the structure of the ZIP archive, a package of several extensions and an update server.
- Deployment and securityMoving a Joomla site to a server, production settings, folder permissions and a security checklist for the site and for your own extensions.