monsieurbiz / mbiz_router
在 Magento 2 上的您的路由。
dev-master
2018-10-31 07:52 UTC
Requires
- php: ~5.6.0|~7.0.0
- magento/framework: ~100.0.4
This package is auto-updated.
Last update: 2024-08-29 05:06:18 UTC
README
简介
在 Magento 2 上的您的路由。
安装
composer require monsieurbiz/mbiz_router=dev-master
使用
静态 URL
- URL:
http://example.org/foo.html
- 匹配:
http://example.org/foo/index/index
config.xml
:
<default> <mbiz_router> <my_router> <type>static</type> <route>foo.html</route> <module>foo</module> <controller>index</controller> <action>index</action> </my_router> </mbiz_router> </default>
正则表达式 URL
- URL:
http://example.org/foo.hmtl
- 匹配:
http://example.org/foo/index/index
config.xml
:
<default> <mbiz_router> <my_router> <type>regex</type> <route>helloworld/(foo|bar|baz)\.html</route> <reverse>helloworld/%1$s.html</reverse> <map> <key>1</key> </map> <module>hello</module> <controller>index</controller> <action>index</action> </my_router> </mbiz_router> </default>
贡献
请享受创建 Pull Requests 的过程。
许可
此源代码在 MIT 许可下提供。
作者
最初由 @jacquesbh 创建,我们为了 Magento 2 而制作。
此外,请参阅贡献者专页中的所有贡献者。
再次踏上征程