MOD_AUTGEN for Joomla
Automatically generated menu module for Joomla
The module is provided as is. It is the final version, so don’t ask me to do any modifications or upgrades to it. Thanks.
DOWNLOAD VERSION 2.2
Link to Joomla! Extensions Directory: automatically generated menu page
I wrote MOD_AUTGEN_MENU when creating a Joomla website for www.lideahory.cz. The main purpose of the mod is to generate a menu contents automatically, by displaying links to all articles in the chosen section or category. So when you add a new article, you don’t have to link it to menu manually – the menu automatically displays the link. Categories in the chosen section may work as headings/separators among menus and/or they can link to the category list. The mod is quite light-weight and also offers a basic possibility to customize the output. The package contains english and czech language files.
The instalation is the same as any other joomla module. Go to extensions -> install and install the .zip file. Then go to extensions -> module manager and enable module AutGen menu. Now you should have the module installed and you can click on its name in module manager to set it up.
The left half of the module settings page is common to all modules, so you probably know it well. Better watch the right part, where you can set the Module Parameters. You can set section or category, from which the menu will be generated, how will be displayed the articles or category titles (links, text or hidden) and output mode (only ul/li list available at the moment, but you can make your own). Under it you can set the order of categories and then order of articles in each category. You can also set the limit to show just a certain number of items.
This is the sample, how the generated HTML code could look like using the default template settings.
<ul class="menu"> <li><span class="separator">Heading 1</span> <ul> <li><a href="link1.html" title="Actual 1"><span>Actual 1</span></a></li> <li><a href="link2.html" title="Actual 2"><span>Actual 2</span></a></li> </ul> </li> <li><span class="separator">Heading 2</span> <ul> <li><a href="link3.html" title="Actual 3"><span>Actual 3</span></a></li> <li><a href="link4.html" title="Actual 4"><span>Actual 4</span></a></li> <li><a href="link5.html" title="Actual 5"><span>Actual 5</span></a></li> </ul> </li> </ul>
After some styling in CSS, you can create something like is the example bellow. This one is taken from www.lideahory.cz.
CUSTOMIZING THE OUTPUT
The template for the output is in /mod_autgen_menu/template.php. If you know just the basic syntax of PHP, you can write your own output format here. Default case(1) is bound to UL/LI output mode in module manager.
If you want to create your own output, just create new case(anynumber) above case(1) and insert your own code there. Then open file /mod_autgen_menu.xml, find param outputmode and insert there new option, having value the number you used for case() and text any name you want to describe your new output mode.
After uploading the files to the server, you should have your new output mode available to choose in module parameters and when you choose it, the function in your new case() should handle the output.
I hope you will find this module usefull and I will be happy for any comments or suggestions. If you create any improvements of the module, please let me know.
[2.2] Enhanced the template handling. Now it is easy to have custom template file in your Joomla theme to override default module output style.
[2.1] Corrected the bug when it was impossible to have more than one AGM module on one page. Should be OK now.
[2.0] Complete redesign, ability to choose from categories or sections, ability to have category titles as link, possibility to hide the articles and show just category list etc. Definitely worth upgrading.
[1.1] Added Module Class Suffix option allowing custom styling in CSS