- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, My question is can I override a single core file with different modules and get both the result.
That is, I have created a custom module called "Filters", and I have overridden the create.phtml file(Create customer account).
customer_account_create:-
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="customer_form_register">
<action method="setTemplate">
<argument name="template" xsi:type="string">Mofosys_Registration::form/register.phtml</argument>
</action>
</referenceBlock>
</body>
</page>
register.phtml:-
<h1>Filter template Overided</h1>
I have created a custom module called "Registration", and I have overridden the create.phtml file(Create customer account) again.
customer_account_create:-
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="customer_form_register">
<action method="setTemplate">
<argument name="template" xsi:type="string">Mofosys_Registration::form/register.phtml</argument>
</action>
</referenceBlock>
</body>
</page>
register.phtml:-
<h1>Registration template Overided</h1>
When i go to Customer create (customer/account/create/ ) page, can I get both the overridden results in the Registration page?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @raju_a
It will show only module file content.
If you need both then you need to create child block and you need to assign it
Hope it will help you.
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @raju_a
It will show only module file content.
If you need both then you need to create child block and you need to assign it
Hope it will help you.
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer