如何在joomla中使用自定义菜单
我使用 Joomla 创建我的网站。现在我创建简单的主菜单。但这个菜单不是joomla模块。对于每个项目菜单,我在源代码中添加链接(当我为模块菜单添加新项目并将该项目与材料绑定时,我会复制此链接)。但是,当我转到菜单中的不同链接时,我不知道如何在菜单项之间转换时突出显示该项目。也许需要从 php 代码创建这个?
例如:
<div class="menu">
<a href = "LINK COPY FROM MODULE MENU"><div class="active">Home</div></a>
<a href = "LINK COPY FROM MODULE MENU"><div class="not_active">Store</div></a>
</div>
从模块菜单复制链接 - 从我的模块菜单项复制链接。 我想转换到商店,然后突出显示此选项卡
I use Joomla for create my web site. Now i create simple main menu. But this menu is not module joomla. For each item menu I add link in my source code(I copy this link when i add new item for module menu and bind this item with material). But when I go to different link in my menu, i don't know how to highlight this item when transition between menu items. Maybe needed create this from php code?
for example:
<div class="menu">
<a href = "LINK COPY FROM MODULE MENU"><div class="active">Home</div></a>
<a href = "LINK COPY FROM MODULE MENU"><div class="not_active">Store</div></a>
</div>
LINK COPY FROM MODULE MENU - this copy link from my module menu item.
I want to transition to Store and after this highlight this tabs
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最好是使用一个模块来实现此目的。扩展菜单是一个非常好的选择。
http://extensions.joomla.org/extensions /struct-a-navigation/menu-systems/tree-menus/163
它非常可定制,比手动编辑每个菜单项或创建自己的菜单模块更好。
SwMenuMaker http://www.swmenupro.com/ 也是一个有用的管理组件,用于管理您的菜单。
Best would be that you use a module for this purpose. Extended menu is a very good option.
http://extensions.joomla.org/extensions/structure-a-navigation/menu-systems/tree-menus/163
It's very customizable and better than editing each menu item by hand or creating your own menu module.
SwMenuMaker http://www.swmenupro.com/ is a useful admin component to manage your menus as well.
我今天遇到了这个问题。我认为没有必要为需要 5 英尺才能编写的内容下载模块。
如果不将模块项或组件项发布到菜单,则无法链接站点内的模块项或组件项。如果不将它们发布到菜单,它们就没有位置。
您需要发布一个菜单模块 - 沼泽标准 Joomla 一个就足够了。您可以在此处链接组件项目和模块项目。
为了使其然后看起来和感觉像您想要的那样,您需要编写CSS(就像您可能为自定义html模块所做的那样)并将此CSS应用到您正在使用'更改的菜单模块“模块类后缀”和“菜单类后缀”字段。
这意味着您需要命名您的菜单并在 CSS 中添加您要更改的类:
div.**yourmenuname** {some: style;}
因此您的“模块类后缀”这可能看起来像
然后你将 yourmenuname 放在 Joomla 后端菜单模块的“模块类后缀”字段中。然后记住将您的样式放在“菜单类后缀”中。
I had this problem today. I didn't see it necessary to download a module for something that takes 5' to write.
You can't link modules items or component item within your site without publishing them to a menu. Without publishing them to a menu, they have no location anyway.
You need to publish a menu module -the bog standard Joomla one is sufficient. Here you can link your component items and module items.
To make it then look and feel the way you want you need to write your css (as you might have done for your custom html module) and apply this css to the menu module you are altering using the 'Module Class Suffix' and 'Menu Class Suffix' fields.
This means you need name your menu and add the class in your that you are altering before it in your CSS:
div.**yourmenuname** {some: style;}
Hence your 'Module Class Suffix' this might look like
Then you place yourmenuname in then 'module class suffix' field in your menu module within the back end of Joomla. Then remember to place your styling in the 'Menu Class Suffix'.