简体   繁体   English

在Joomla中更改子菜单URL

[英]Change Submenu URL in Joomla

I need to change sub menu URLs in Joomla. 我需要在Joomla中更改子菜单URL。

在此处输入图片说明

In the above example, if I click Graphic design, then the URL showing: 在上面的示例中,如果单击“图形设计”,则URL显示:

www.mydomain.com/moreservices/graphicdesign.html www.mydomain.com/moreservices/graphicdesign.html

But I don't need "moreservices" in the above URL. 但我不需要上述URL中的“更多服务”。

The same way, suppose if I click the Walkthrough, the URL is 以相同的方式,假设如果我单击演练,则URL为

www.mydomain.com/moreservices/3d/walkthrough.html www.mydomain.com/moreservices/3d/walkthrough.html

Here I don't need "moreservices/3d/" from the URL. 在这里,我不需要URL中的“ moreservices / 3d /”。 How can I change URL? 如何更改网址?

Unfortunately there is no easy fix for this because that is how Joomla builds a URL from a menu item. 不幸的是,对此没有简单的解决方法,因为Joomla就是通过菜单项构建URL的。 The only way to get rid of the parent menu item is to create a new menu where you will move all of the sub menu items to. 摆脱父菜单项的唯一方法是创建一个新菜单,将所有子菜单项移至其中。 They have to be top level items in this new menu so that the URLs look like you want them to. 它们必须是此新菜单中的顶级项,以便URL看起来像您想要的那样。 You do not need to put this menu in a module, it does not need to display anywhere, it just needs to exists. 您不需要将此菜单放在模块中,也不需要在任何地方显示,它只需要存在即可。

Next, once you have moved all the sub menus to this new menu, you will create new menu item aliases for each of them. 接下来,将所有子菜单移至该新菜单后,将为每个子菜单创建新的菜单项别名。 A menu alias inherits its URL from the menu item it redirects to so your URLs should look like you want them to. 菜单别名从其重定向到的菜单项继承其URL,因此您的URL应该看起来像您希望的那样。

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

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