3

We need a module to function differently and show different UI if its comes with different frontname

i.e

If Externalvendor/Module1 has routes like

    <router id="standard">
        <route id="routing1" frontName="routing1">
            <module name="Externalvendor_Module1"/>
        </route>
    </router>

For above routing I tried adding routing alias under Custom/Module1 routes like

   <router id="standard">
        <route id="routing2" frontName="routing2">
            <module name="Externalvendor_Module1"/>
        </route>
    </router>

So here I was expecting when I access domain.com/routing2 it will load same front pages like domain.com/routing1 but currently it shows white page and I am not seeing any exception or no error log. How should be this done?

0

You need to use below code for Custom/Module1:

<router id="standard">
    <route id="routing2" frontName="routing2">
        <module name="Custom_Module1"/>
    </route>
</router>
  • then this will became its own module and frontname. I need the second frontname for already available module and its functionalities like alias front URL – Elamurugan Sep 21 '18 at 18:47
  • Then why not you are override the files because you cannot use frontname from another module. You need to override then – Sukumar Gorai Sep 21 '18 at 18:50
0

Use below code for more than one frontname:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard">
    <route id="detector_id_1" frontName="detection1">
        <module name="Package_Module" />
    </route>        
    <route frontName="detection2" id="detector_id_2">
        <module name="Package_Module"/>
    </route>
</router>
</config>

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.