Joomla:如何在浏览单独的子菜单项时突出显示主菜单项? [英] Joomla: How to keep main menu item highlighted while navigating through separate submenu items?

查看:26
本文介绍了Joomla:如何在浏览单独的子菜单项时突出显示主菜单项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作一个水平的类别"主菜单和一个与主菜单分开的垂直子菜单.当我选择一个类别时,它的主页会显示出来.但是,当我从子菜单中选择另一个页面时,该页面应该来自同一类别,然后主菜单中的类别"项目停止突出显示.所有菜单都定义为独立"模块,我使用的是 Joomla 1.6.3.

I'm trying to make a horizontal, "category" main menu and a vertical submenu, separated from the main one. When I select a category its main page is displayed. But when I select another page from the submenu, that is supposed to be from the same category, then the "category" item from main menu stops being highlighted. All the menus are defined as a "stand-alone" modules and I'm using Joomla 1.6.3.

推荐答案

当时我不知道的是,我应该将顶部菜单中的每个项目设置为菜单项别名.这使我可以在从子菜单中选择项目时突出显示项目.

What I didn't know at the time was that I should set each item in the top menu as a Menu Item Alias. This allowed me to keep the item highlighted when items were selected from the submenu.

根据 Joomla 文档 http://docs.joomla.org/Help16:Menus_Menu_Item_Manager_Edit#Menu_Item_Alias:

According to Joomla documentation http://docs.joomla.org/Help16:Menus_Menu_Item_Manager_Edit#Menu_Item_Alias:

"此菜单项类型创建指向现有菜单项的链接.它允许你在两个或更多不同的菜单上有相同的菜单项无需复制设置.因此,例如,如果您更改一个具有链接到它的别名的菜单项的参数,别名将自动获得相同的更改."

"This Menu Item Type creates a Link to an existing Menu Item. It allows you to have identical Menu Items on two or more different Menus without duplicating the settings. So, for example, if you change a parameter of a Menu Item that has an Alias linked to it, the Alias will automatically acquire the same change."

对于那些像我以前一样,正在为 Joomla 菜单的想法而苦苦挣扎的人 - 这种配置中的主菜单位于模块菜单"中,开始和结束级别设置为 1(基本选项),子菜单位于不同的模块"中,但带有相同的菜单,但从第 2 级开始.

For those who, like me before, are struggling with the idea of Joomla menus - the main menu in such configuration sits in a "Module Menu" with Start and End Level set to 1 (Basic Options), and the submenu sits in a different "Module", but carries the same menu, buts starts from Level 2.

这篇关于Joomla:如何在浏览单独的子菜单项时突出显示主菜单项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆