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?

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>
  • 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> – Naveen kumar Aug 21 at 10:39
  • im assuming this is what you are asking for. <representatives_new_index_index> – Dava Gordon Aug 21 at 11:09
  • Do I have to create differenct also for that? – Naveen kumar Aug 21 at 11:12
  • Yes new controller and new layout file – Dava Gordon Aug 21 at 11:18
  • Thanks . its working now. – Naveen kumar Aug 21 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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