SEF url 不是 joomla1.5 中菜单项的 alias.html 名称

发布于 2025-01-07 18:59:36 字数 779 浏览 4 评论 0原文

我的组件 com_listing 有两个菜单链接,其链接如下

  1. index.php?option=com_listing&view=catlist&Itemid=134
  2. index.php?option=com_listing&view=catlist&Itemid=135

两个菜单项都有组件菜单父类别和子类别的项目特定参数。通过设置这两个参数值,每个链接将显示不同的数据,尽管它们是相同的链接,但菜单项中的菜单项特定参数不同。

他们工作正常,并根据 Itemid 显示链接的不同数据

  1. index.php?option=com_listing&view=catlist&Itemid=134
  2. index.php?option=com_listing&view=catlist&Itemid=135

我正在检索参数值因此,在不同 itemid 上的同一链接上获取不同的数据,但是当我访问 SEF 中的上述菜单链接时,它会创建与“catlist.html”相同的 url .我正在使用 SH404 组件进行 SEF 在 url catlist.html 上,它仅显示一种类型的数据,这意味着这两个 url 的 itemid 相同,而且 url 应该是 blog.html 和 catelog.html,因为 alisa 这些项目是博客(针对 Itemid 134)和类别日志(Item id 135)。我已经进行了大量的冲浪,但没有得到任何结果,请注意,由于参数不同,我无法使用创建“菜单别名”类型的链接请帮忙

I have two menu links of my component com_listing whose links are as follows

  1. index.php?option=com_listing&view=catlist&Itemid=134
  2. index.php?option=com_listing&view=catlist&Itemid=135

Both menu item have component menu item specific parameters of parent category and child category .by setting these two parameter values each link will show different data although they are the same link but their menu item specific parameter in menu item is different.

They are working fine and showing different data for their links

  1. index.php?option=com_listing&view=catlist&Itemid=134
  2. index.php?option=com_listing&view=catlist&Itemid=135

according to Itemid i am retriving the parameter values and hence getting different data on the same link on different itemid but when i am accessing above menu links in SEF then it is creatiing the same url as "catlist.html" .I am using the SH404 Component for SEF
on the url catlist.html it is showing only one type of data means itemid is coming same for both of the urls and also the url should be blog.html and catelog.html since the alisa
of those items are blog(for Itemid 134) and catelog(Item id 135).I have done lot's of surfing but not getting any results and please do mind i can not use create links of type "menu alias" because of the different parameters please help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

玻璃人 2025-01-14 18:59:36

您的问题是因为您的菜单项中没有唯一的标题别名。当您关闭 SEF URL 时,您会将 itemid 作为查询字符串的一部分,以便 Joomla 知道使用哪个菜单项来提取参数。

当您打开 SEF URL 时,没有查询字符串,因此 Joomla 必须使用标题别名 catlist.html 来确定要使用哪个菜单项。由于它有 2 个具有相同别名的菜单,因此它只使用查询中返回的第一个菜单,因为没有其他方法可以区分它们。将其中一个菜单项的标题别名更改为 catlist2,您将拥有 2 个唯一的 URL,它们都显示您想要的内容。

Your problem is because you do not have unique title aliases in your menu items. When you have SEF URLs turned off, you have the itemid as part of the query string so Joomla knows which menu item to use to pull the parameters.

When you turn on SEF URLs, there is no query string so Joomla has to use the title alias catlist.html to figure out which menu item to use. Since it has 2 menus with the same alias, it just uses the first one that is returned in the query since there is no other way to tell them apart. Change the title alias of one of the menu items to catlist2 and you will have 2 unique URLs that both show what you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文