monsieurbiz/mbiz_router

Your routes on Magento 2.

dev-master 2018-10-31 07:52 UTC

This package is auto-updated.

Last update: 2024-03-29 03:57:54 UTC


README

Introduction

Your routes on Magento 2.

Installation

composer require monsieurbiz/mbiz_router=dev-master

Usage

Static URL

  • URL: http://example.org/foo.html
  • Match: 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>

Regex URL

  • URL: http://example.org/foo.hmtl
  • Match: 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>

Contribute

Please enjoy creating Pull Requests.

License

This source code is provided under MIT License.

Authors

Originally created by @jacquesbh, we made it for Magento 2.

Also, please find all contributors in the dedicated page.

On the road again