This tutorial explains how to customize Joomla 6's built-in Articles - Categories module (mod_articles_categories) using two template overrides:
- Vertical Accordion: Displays categories vertically with expandable subcategories.
- Horizontal Dropdown: Displays categories horizontally with multilevel dropdown menus.
Both layouts support active-category highlighting, automatic expansion of parent categories, and optional article links.
No additional extensions or Joomla core modifications are required.
1. Download the Override Files
Download the two override packages and extract their contents.
Vertical Accordion:
- default-accordion.php
- default-accordion_items.php
Horizontal Dropdown:
- default-horizontal.php
- default-horizontal_items.php
You can install either layout or both.
2. Upload the Files
Using FTP or your hosting File Manager, navigate to:
/templates/YOUR_TEMPLATE/html/mod_articles_categories/
Replace YOUR_TEMPLATE with your active Joomla template name.
Create the directory if it does not exist.
Upload the extracted PHP files into this folder.
Important: Do not modify the original Joomla module files.
3. Configure the Articles - Categories Module
In the Joomla administrator panel:
- Navigate to Content → Site Modules.
- Create or edit an Articles - Categories module.
- Select the Parent Category.
- Enable Show Subcategories.
- Configure Maximum Level Depth and the other available category settings.
- Assign the module to a template position and the desired menu items.
Select the Override Layout
Under the module's Advanced tab, find Alternative Layout.
Choose:
- default-accordion for the Vertical Accordion.
- default-horizontal for the Horizontal Dropdown.
Save the module.
4. How the Overrides Work
Both layouts display the categories according to the module settings.
- Clicking a category title opens its Joomla category page.
- Clicking the arrow expands or collapses its subcategories.
- Multiple category levels are supported.
- The current category is automatically highlighted.
- Parent categories of the active category remain expanded.
- When viewing an article, its category is automatically identified and highlighted.
The Vertical Accordion is suitable for sidebars, while the Horizontal Dropdown is suitable for header navigation or full-width sections.
5. Optional: Display Articles Inside Categories
Both overrides can also display article links below each category.
Open the corresponding main PHP file:
- default-accordion.php
- default-horizontal.php
Find:
$showArticles = false;
$articlesPerCategory = 5;
To enable article links, change the settings to:
$showArticles = true;
$articlesPerCategory = 5;
This displays up to five articles per category.
To display all articles, set:
$articlesPerCategory = 0;
Save the file and upload it again if you edited it locally.
Note: These options are configured directly in the override PHP file, not in the module's administrator settings.
6. Using Both Layouts
You can use both overrides on the same website.
For example:
- Header: Articles - Categories module using default-horizontal.
- Sidebar: Articles - Categories module using default-accordion.
Simply create two module instances and select the appropriate Alternative Layout for each.
7. Troubleshooting
Override not available: Verify the filenames and the template override directory.
Subcategories not appearing: Check the module's Show Subcategories and Maximum Level Depth settings.
Active category not highlighted: Make sure the current category belongs to the hierarchy displayed by the module.
Articles not displayed: Check that $showArticles is set to true and that the category contains published, accessible articles.
Dropdown display issues: Check for CSS conflicts with your Joomla template, particularly overflow: hidden on parent containers.
Conclusion
These two template overrides enhance the Joomla 6 Articles - Categories module (mod_articles_categories) with interactive multilevel navigation.
The Vertical Accordion and Horizontal Dropdown provide flexible navigation while preserving Joomla's existing category structure and settings.
Both layouts can be used independently or together, without modifying Joomla core files.
ACCORDION DEMO
HORIZONTAL DEMO
Compatibility: Joomla 6
Module: Articles - Categories (mod_articles_categories)
Type: Template Override
Layouts: Vertical Accordion / Horizontal Dropdown