简体   繁体   中英

Different Joomla Template Overrides For Different Joomla Menus

I am using Joomla v1.7 and the mod_mainmenu is now mod_menu (I think, because there is no mod_mainmenu in the modules folder). In my site I have two menus like most sites, one in the header and another one in the footer. The header menu is a lot more complex with drop downs, while the footer menu simply has four links. I am in the process of overriding the mod_menu template for the header menu but that would also render the same overridden html for footer menu.

How do I make two separate overrides for two separate menus. In the footer I was thinking of hardcoding anchor tags, but that would make it difficult for my client to add or remove links from the footer. How do I do this? Is it possible?

Thanks!

I appreciate the help.

This is very easy to achieve in J1.7. You simply use a module alternative layout. These work very similar to a template override. Normally for a template override you would create this file -

templates/template name/html/module name/default.php

To make an alternative layout, you simply name it something else -

templates/template name/html/module name/footermenu.php

Just make sure that the file name does not contain any underscores. Once you have set up this file, it will appear in the module Advanced Options under alternative Layout. Just select the one you want to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM