Drupal Internalurl重写
我正在尝试做一些非常简单的事情,但似乎找不到一种方法。我想要的是以/en/en/products/consectories+软件
内部路由到/en/products?附件+软件
内部路由。
/en/products
是现有页面,无论是在基本上是过滤器的,它们都附加到URL上,因此可以直接链接。现在,它可以通过将其作为查询参数附加起来,但是使用/fillters
是首选。但这当然会导致404误差。
站点正在运行D9。
I am trying to do something very simple, but can't seem to find a way to do it. What I want is to have a URL in the form of /en/products/accessories+software
internally route to /en/products?accessories+software
.
/en/products
is an existing page, whatever comes after are basically filters, which are appended to the URL so they can be linked directly. Now it works by appending it as query parameters, but using /filtersHere
would be preferred. But this of course results in a 404 error.
Site is running D9.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不使用Drupal的路由系统并在URL上进行动态论点?
在Module.Routing.yml中,下面的事情应该做:
官方文档中可用的更多详细信息:
drupal-路线的结构
Why not use Drupal's Routing system and make dynamic arguments on URL?
In the module.routing.yml, something like below should do:
More details available in the official doc:
Drupal - Structure of routes