Skip to main content
deleted 2 characters in body
Source Link
Dinesh Yadav
  • 6.5k
  • 2
  • 23
  • 50

Use sequence in your module.xml in order to load phtml file from your custom module

app/code/Custom/Module/etc/module.xml

app/code/Custom/Module/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Custom_Module" setup_version="1.0.0">
        <sequence>
            <module name="Thirdparty_Module"/>
        </sequence>
    </module>
</config>

app/code/Custom/Module/view/frontend/layout/thirdparty_module_action.xml

<referenceBlock name="third_party_block_name">
    <action method="setTemplate">
        <argument name="template" xsi:type="string">Custom_Module::thirdparty_template.phtml</argument>
    </action>
</referenceBlock>

Use sequence in your module.xml in order to load phtml file from your custom module

app/code/Custom/Module/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Custom_Module" setup_version="1.0.0">
        <sequence>
            <module name="Thirdparty_Module"/>
        </sequence>
    </module>
</config>

app/code/Custom/Module/view/frontend/layout/thirdparty_module_action.xml

<referenceBlock name="third_party_block_name">
    <action method="setTemplate">
        <argument name="template" xsi:type="string">Custom_Module::thirdparty_template.phtml</argument>
    </action>
</referenceBlock>

Use sequence in your module.xml in order to load phtml file from your custom module

app/code/Custom/Module/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Custom_Module" setup_version="1.0.0">
        <sequence>
            <module name="Thirdparty_Module"/>
        </sequence>
    </module>
</config>

app/code/Custom/Module/view/frontend/layout/thirdparty_module_action.xml

<referenceBlock name="third_party_block_name">
    <action method="setTemplate">
        <argument name="template" xsi:type="string">Custom_Module::thirdparty_template.phtml</argument>
    </action>
</referenceBlock>
Source Link
Dinesh Yadav
  • 6.5k
  • 2
  • 23
  • 50

Use sequence in your module.xml in order to load phtml file from your custom module

app/code/Custom/Module/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Custom_Module" setup_version="1.0.0">
        <sequence>
            <module name="Thirdparty_Module"/>
        </sequence>
    </module>
</config>

app/code/Custom/Module/view/frontend/layout/thirdparty_module_action.xml

<referenceBlock name="third_party_block_name">
    <action method="setTemplate">
        <argument name="template" xsi:type="string">Custom_Module::thirdparty_template.phtml</argument>
    </action>
</referenceBlock>