我正在尝试在 Magento 中创建我的第一个模块。
我不能做的事情是按照我想要的方式定义模块的路由。
我想创建一个路由“网关/iphone”,但它不起作用。是否可以在路由定义中使用“/”?
这是我的模块定义:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Nacho_GatewayIphone>
<version>0.1.0</version>
</Nacho_GatewayIphone>
</modules>
<frontend>
<routers>
<nacho_gatewayiphone>
<use>standard</use>
<args>
<module>Nacho_GatewayIphone</module>
<frontName>gateway_iphone</frontName>
</args>
</nacho_gatewayiphone>
</routers>
</frontend>
</config>
它在 /gateway_iphone 中运行良好,但是如果我将<frontName>
值更改为<frontName>gateways/iphone</frontName>
尝试点击 /gateways/iphone 时它不会运行。
是否可以在路由器定义中使用“/”字符?