0
votes

I have setup a custom module in my magento store (CE-1.9.0.0) with the following in my config file:

<?xml version="1.0"?>
<config>
    <modules>
        <Company_Custom>
            <version>0.1.0</version>
        </Company_Custom>
    </modules>
    <frontend>
        <routers>
            <custom>
                <use>standard</use>
                <args>
                    <module>Company_Custom</module>
                    <frontName>our-work/digital-work</frontName>
                </args>
            </custom>
        </routers>
        etc...

I know that when I have setup custom modules before the frontname works when it is a single string (i.e if I wanted to use just digital-work this works, just not when I have a nested string in place as in our-work/digital-work - this results in a page not found.

I am new to routers and magento so I presume I have misinterpreted what is possible in the <frontName> Is it possible to have a nested frontname?

1

1 Answers

0
votes

The frontName is not the url, instead it represents only the first part of it! Usually a magento action url looks like domain.com/frontName/controllerName/action where frontName is the name specified in the config.xml, controllerNameController.php is the controller having the function actionAction Explained Here

So frontName is the part that maps to your module, for example you might have a module Company_Custom but you want don't want to have urls as "company_custom/features/list", instead you want something like "custom/features/list" in this case you should have:

                <args>
                    <module>Company_Custom</module>
                    <frontName>custom</frontName>
                </args>

You can use URL rewrite from Admin in order to map a custom url to the real url