简体   繁体   English

Joomla 3:如何从菜单项调用文章并将该菜单显示为活动状态?

[英]Joomla 3: How do I call an article from a menu item and show that menu as active?

I have a standard navigation menu on my banner. 我的横幅上有一个标准的导航菜单。 Then I have another menu below that, in my body area, and this is used made to appear as 'tabs' by using css styling. 然后在我的身体区域下,还有另一个菜单,该菜单通过使用CSS样式用于显示为“选项卡”。 Thus each tab (actually menu) has its own articles. 因此,每个选项卡(实际上是菜单)都有自己的文章。

Now, When I click a tab, the article shows. 现在,当我单击一个选项卡时,将显示该文章。 But I have a link to the first tab on the top menu (in my banner). 但是我有一个指向顶部菜单中第一个选项卡的链接(在我的横幅中)。 This links to the article in the first tab. 这链接到第一个选项卡中的文章。 When the menu item in the banner is clicked, the first tab's article shows fine. 单击标题中的菜单项时,第一个选项卡的文章将显示正常。 But it does not show the first tab as active. 但是它不会显示第一个选项卡为活动状态。 The first tab only shows as the active link when I click it. 当我单击第一个选项卡时,它仅显示为活动链接。

How do I make the tab (menu item) active when the menu item in the banner is clicked? 单击标题中的菜单项时,如何激活选项卡(菜单项)?

To better illustrate this, I've included a screenshot. 为了更好地说明这一点,我提供了一个屏幕截图。 在此处输入图片说明 Thanks! 谢谢!

First you need to put both menus into one single menu since the second is basically a submenu of the first. 首先,您需要将两个菜单都放在一个菜单中,因为第二个菜单基本上是第一个子菜单。 After that is done you "split" the in two modules: For the top menu you set the module options to "Start Level" 1 and "End Level" 1. And "Show Sub-menu Items" is set to "No". 完成之后,您将“拆分”为两个模块:对于顶部菜单,将模块选项设置为“开始级别” 1和“结束级别”1。“显示子菜单项”设置为“否”。 The second module has the "Start Level" set to 2. 第二个模块的“启动级别”设置为2。

That should probably do what you want to do. 那可能应该做您想做的事。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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