开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜