0

Below is the code for the router in config.xml

<routers>
    <representatives>
        <use>standard</use>
        <args>
            <module>Mage_Representatives</module>
            <frontName>dealer-questionnaire</frontName>
        </args>
    </representatives>
</routers>

I want to add one more route in this module how can I do that?

1 Answer 1

3

This is pretty simple to do you just need to add your additional routes like so

    <routers>
        <representatives>
            <use>standard</use>
            <args>
                <module>Mage_Representatives</module>
                <frontName>dealer-questionnaire</frontName>
            </args>
        </representatives>
        <representatives_new>
            <use>standard</use>
            <args>
                <module>Mage_Representatives</module>
                <frontName>dealer-questionnaire_new</frontName>
            </args>
        </representatives_new>
    </routers>
5
  • How can I add template to that route? my current layout file looks like this. <?xml version="1.0"?> <layout version="0.1.0"> <representatives_index_index> <reference name="root"> <action method="setTemplate"> <template>page/1column.phtml</template> </action> </reference> <reference name="content"> <block type="core/template" name="representatives.form" as="brochure_form" template="representatives/form.phtml"/> </reference> </representatives_index_index> </layout> Commented Aug 21, 2019 at 10:39
  • im assuming this is what you are asking for. <representatives_new_index_index> Commented Aug 21, 2019 at 11:09
  • Do I have to create differenct also for that? Commented Aug 21, 2019 at 11:12
  • Yes new controller and new layout file Commented Aug 21, 2019 at 11:18
  • Thanks . its working now. Commented Aug 21, 2019 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.