how to override Custom theme phtml file by custom moduleMagento2 - Override theme phtmlHow can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Override vendor/magento/module-customer PHTML fileHow to override magento theme layout fileMagento 2.2.5: Overriding Admin Controller sales/orderMagento2: Override default phtml file without create custom theme?Magento 2.2.5: Add, Update and Delete existing products Custom Options
The baby cries all morning
Go Pregnant or Go Home
The plural of 'stomach"
There is only s̶i̶x̶t̶y one place he can be
Cynical novel that describes an America ruled by the media, arms manufacturers, and ethnic figureheads
Minimal reference content
how to analyze "是其于主也至忠矣"
How could Frankenstein get the parts for his _second_ creature?
Is there an Impartial Brexit Deal comparison site?
Is there a problem with hiding "forgot password" until it's needed?
Hide Select Output from T-SQL
Should my PhD thesis be submitted under my legal name?
Will it be accepted, if there is no ''Main Character" stereotype?
Using parameter substitution on a Bash array
How do I rename a LINUX host without needing to reboot for the rename to take effect?
At which point does a character regain all their Hit Dice?
Why did Kant, Hegel, and Adorno leave some words and phrases in the Greek alphabet?
How can my private key be revealed if I use the same nonce while generating the signature?
Why does John Bercow say “unlock” after reading out the results of a vote?
Why "be dealt cards" rather than "be dealing cards"?
If a character can use a +X magic weapon as a spellcasting focus, does it add the bonus to spell attacks or spell save DCs?
Is there any reason not to eat food that's been dropped on the surface of the moon?
Is it correct to write "is not focus on"?
The Riley Riddle Mine
how to override Custom theme phtml file by custom module
Magento2 - Override theme phtmlHow can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Override vendor/magento/module-customer PHTML fileHow to override magento theme layout fileMagento 2.2.5: Overriding Admin Controller sales/orderMagento2: Override default phtml file without create custom theme?Magento 2.2.5: Add, Update and Delete existing products Custom Options
I Want to override this is Current theme path that i want to override.
I have a file In
/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml
but i want to override in my theme, Path Like :-
app/code/Vendor/Module/view/frontend/templates/gallery.phtml
here is my xml file :-preview_product_gallery.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Vendor_Module::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
</page>
magento2 theme
add a comment |
I Want to override this is Current theme path that i want to override.
I have a file In
/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml
but i want to override in my theme, Path Like :-
app/code/Vendor/Module/view/frontend/templates/gallery.phtml
here is my xml file :-preview_product_gallery.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Vendor_Module::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
</page>
magento2 theme
You can't extend your theme file into your custom module, since magento 2 use fallback method so initially it will look up the file in your theme then into your custom module i.e., app/code... So in order to override your theme file create a child theme by parenting your current theme . In such a way you can extend I hope
– Prathap Gunasekaran
yesterday
add a comment |
I Want to override this is Current theme path that i want to override.
I have a file In
/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml
but i want to override in my theme, Path Like :-
app/code/Vendor/Module/view/frontend/templates/gallery.phtml
here is my xml file :-preview_product_gallery.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Vendor_Module::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
</page>
magento2 theme
I Want to override this is Current theme path that i want to override.
I have a file In
/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml
but i want to override in my theme, Path Like :-
app/code/Vendor/Module/view/frontend/templates/gallery.phtml
here is my xml file :-preview_product_gallery.xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Vendor_Module::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
</page>
magento2 theme
magento2 theme
edited yesterday
Praveen Negimani
asked yesterday
Praveen NegimaniPraveen Negimani
357
357
You can't extend your theme file into your custom module, since magento 2 use fallback method so initially it will look up the file in your theme then into your custom module i.e., app/code... So in order to override your theme file create a child theme by parenting your current theme . In such a way you can extend I hope
– Prathap Gunasekaran
yesterday
add a comment |
You can't extend your theme file into your custom module, since magento 2 use fallback method so initially it will look up the file in your theme then into your custom module i.e., app/code... So in order to override your theme file create a child theme by parenting your current theme . In such a way you can extend I hope
– Prathap Gunasekaran
yesterday
You can't extend your theme file into your custom module, since magento 2 use fallback method so initially it will look up the file in your theme then into your custom module i.e., app/code... So in order to override your theme file create a child theme by parenting your current theme . In such a way you can extend I hope
– Prathap Gunasekaran
yesterday
You can't extend your theme file into your custom module, since magento 2 use fallback method so initially it will look up the file in your theme then into your custom module i.e., app/code... So in order to override your theme file create a child theme by parenting your current theme . In such a way you can extend I hope
– Prathap Gunasekaran
yesterday
add a comment |
4 Answers
4
active
oldest
votes
For example if you wants to overwrite the following file:
/var/www/html/magento2/app/design/frontend/<Vendor>/<Theme>/</Magento_Catalog/templates/product/list/items.phtml
in to your module, then copy above file in following location and updated as you wants:
/var/www/html/magento2/app/code/<Vendor>/<Module>/view/frontend/templates/product/list/items.phtml
and add following code(just for example) in your module xml file:
<referenceBlock name="product.info.upsell" template="Vendor_Module::product/list/items.phtml"/>
Let me know if this is works for you.
Thanks
New contributor
Kamlesh Yaduwanshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Thank you @kamlesh, but its not working. am trying different file path/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml
– Praveen Negimani
yesterday
Ok, this is your theme path. Now, may I know your module path?
– Kamlesh Yaduwanshi
yesterday
I think your module path to overwrite this file should be /public_html/app/design/frontend/<vendor>/<module>/view/frontend/templates/product/view/gallery.phtml
– Kamlesh Yaduwanshi
yesterday
thanks @kamleshyes, my module path is same as above..
– Praveen Negimani
17 hours ago
still it not affecting
– Praveen Negimani
16 hours ago
|
show 1 more comment
If you two module one is Vendor_Module for layout and Retailinsights_Preview for template file. then change code as belows in your preview_product_gallery.xml:
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Retailinsights_Preview::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
sorry for vendor/module mismatch i edited question, please checkout
– Praveen Negimani
yesterday
Please let me know your preview_product_gallery.xml file path in module ?
– Mohit chauhan
yesterday
Thank you for response. /public_html/app/code/vendor/module/view/frontend/layout
– Praveen Negimani
yesterday
add a comment |
You can try this code .
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Retailinsights_Preview::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
</page>
add a comment |
You can't overwrite a theme file with a module.
The best and cleanest way to handle this is creating you own theme that extends the one you are currently using and then overwriting the template.
This seems like it's a bit overkill at the beginning, but it has the benefit of your parent-theme to be updateable.
Thank you for responce, Ill check it
– Praveen Negimani
yesterday
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267247%2fhow-to-override-custom-theme-phtml-file-by-custom-module%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
For example if you wants to overwrite the following file:
/var/www/html/magento2/app/design/frontend/<Vendor>/<Theme>/</Magento_Catalog/templates/product/list/items.phtml
in to your module, then copy above file in following location and updated as you wants:
/var/www/html/magento2/app/code/<Vendor>/<Module>/view/frontend/templates/product/list/items.phtml
and add following code(just for example) in your module xml file:
<referenceBlock name="product.info.upsell" template="Vendor_Module::product/list/items.phtml"/>
Let me know if this is works for you.
Thanks
New contributor
Kamlesh Yaduwanshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Thank you @kamlesh, but its not working. am trying different file path/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml
– Praveen Negimani
yesterday
Ok, this is your theme path. Now, may I know your module path?
– Kamlesh Yaduwanshi
yesterday
I think your module path to overwrite this file should be /public_html/app/design/frontend/<vendor>/<module>/view/frontend/templates/product/view/gallery.phtml
– Kamlesh Yaduwanshi
yesterday
thanks @kamleshyes, my module path is same as above..
– Praveen Negimani
17 hours ago
still it not affecting
– Praveen Negimani
16 hours ago
|
show 1 more comment
For example if you wants to overwrite the following file:
/var/www/html/magento2/app/design/frontend/<Vendor>/<Theme>/</Magento_Catalog/templates/product/list/items.phtml
in to your module, then copy above file in following location and updated as you wants:
/var/www/html/magento2/app/code/<Vendor>/<Module>/view/frontend/templates/product/list/items.phtml
and add following code(just for example) in your module xml file:
<referenceBlock name="product.info.upsell" template="Vendor_Module::product/list/items.phtml"/>
Let me know if this is works for you.
Thanks
New contributor
Kamlesh Yaduwanshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Thank you @kamlesh, but its not working. am trying different file path/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml
– Praveen Negimani
yesterday
Ok, this is your theme path. Now, may I know your module path?
– Kamlesh Yaduwanshi
yesterday
I think your module path to overwrite this file should be /public_html/app/design/frontend/<vendor>/<module>/view/frontend/templates/product/view/gallery.phtml
– Kamlesh Yaduwanshi
yesterday
thanks @kamleshyes, my module path is same as above..
– Praveen Negimani
17 hours ago
still it not affecting
– Praveen Negimani
16 hours ago
|
show 1 more comment
For example if you wants to overwrite the following file:
/var/www/html/magento2/app/design/frontend/<Vendor>/<Theme>/</Magento_Catalog/templates/product/list/items.phtml
in to your module, then copy above file in following location and updated as you wants:
/var/www/html/magento2/app/code/<Vendor>/<Module>/view/frontend/templates/product/list/items.phtml
and add following code(just for example) in your module xml file:
<referenceBlock name="product.info.upsell" template="Vendor_Module::product/list/items.phtml"/>
Let me know if this is works for you.
Thanks
New contributor
Kamlesh Yaduwanshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
For example if you wants to overwrite the following file:
/var/www/html/magento2/app/design/frontend/<Vendor>/<Theme>/</Magento_Catalog/templates/product/list/items.phtml
in to your module, then copy above file in following location and updated as you wants:
/var/www/html/magento2/app/code/<Vendor>/<Module>/view/frontend/templates/product/list/items.phtml
and add following code(just for example) in your module xml file:
<referenceBlock name="product.info.upsell" template="Vendor_Module::product/list/items.phtml"/>
Let me know if this is works for you.
Thanks
New contributor
Kamlesh Yaduwanshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Kamlesh Yaduwanshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered yesterday
Kamlesh YaduwanshiKamlesh Yaduwanshi
112
112
New contributor
Kamlesh Yaduwanshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Kamlesh Yaduwanshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Kamlesh Yaduwanshi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Thank you @kamlesh, but its not working. am trying different file path/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml
– Praveen Negimani
yesterday
Ok, this is your theme path. Now, may I know your module path?
– Kamlesh Yaduwanshi
yesterday
I think your module path to overwrite this file should be /public_html/app/design/frontend/<vendor>/<module>/view/frontend/templates/product/view/gallery.phtml
– Kamlesh Yaduwanshi
yesterday
thanks @kamleshyes, my module path is same as above..
– Praveen Negimani
17 hours ago
still it not affecting
– Praveen Negimani
16 hours ago
|
show 1 more comment
Thank you @kamlesh, but its not working. am trying different file path/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml
– Praveen Negimani
yesterday
Ok, this is your theme path. Now, may I know your module path?
– Kamlesh Yaduwanshi
yesterday
I think your module path to overwrite this file should be /public_html/app/design/frontend/<vendor>/<module>/view/frontend/templates/product/view/gallery.phtml
– Kamlesh Yaduwanshi
yesterday
thanks @kamleshyes, my module path is same as above..
– Praveen Negimani
17 hours ago
still it not affecting
– Praveen Negimani
16 hours ago
Thank you @kamlesh, but its not working. am trying different file path
/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml– Praveen Negimani
yesterday
Thank you @kamlesh, but its not working. am trying different file path
/public_html/app/design/frontend/Venustheme/fashion/Magento_Catalog/templates/product/view/gallery.phtml– Praveen Negimani
yesterday
Ok, this is your theme path. Now, may I know your module path?
– Kamlesh Yaduwanshi
yesterday
Ok, this is your theme path. Now, may I know your module path?
– Kamlesh Yaduwanshi
yesterday
I think your module path to overwrite this file should be /public_html/app/design/frontend/<vendor>/<module>/view/frontend/templates/product/view/gallery.phtml
– Kamlesh Yaduwanshi
yesterday
I think your module path to overwrite this file should be /public_html/app/design/frontend/<vendor>/<module>/view/frontend/templates/product/view/gallery.phtml
– Kamlesh Yaduwanshi
yesterday
thanks @kamleshyes, my module path is same as above..
– Praveen Negimani
17 hours ago
thanks @kamleshyes, my module path is same as above..
– Praveen Negimani
17 hours ago
still it not affecting
– Praveen Negimani
16 hours ago
still it not affecting
– Praveen Negimani
16 hours ago
|
show 1 more comment
If you two module one is Vendor_Module for layout and Retailinsights_Preview for template file. then change code as belows in your preview_product_gallery.xml:
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Retailinsights_Preview::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
sorry for vendor/module mismatch i edited question, please checkout
– Praveen Negimani
yesterday
Please let me know your preview_product_gallery.xml file path in module ?
– Mohit chauhan
yesterday
Thank you for response. /public_html/app/code/vendor/module/view/frontend/layout
– Praveen Negimani
yesterday
add a comment |
If you two module one is Vendor_Module for layout and Retailinsights_Preview for template file. then change code as belows in your preview_product_gallery.xml:
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Retailinsights_Preview::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
sorry for vendor/module mismatch i edited question, please checkout
– Praveen Negimani
yesterday
Please let me know your preview_product_gallery.xml file path in module ?
– Mohit chauhan
yesterday
Thank you for response. /public_html/app/code/vendor/module/view/frontend/layout
– Praveen Negimani
yesterday
add a comment |
If you two module one is Vendor_Module for layout and Retailinsights_Preview for template file. then change code as belows in your preview_product_gallery.xml:
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Retailinsights_Preview::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
If you two module one is Vendor_Module for layout and Retailinsights_Preview for template file. then change code as belows in your preview_product_gallery.xml:
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Retailinsights_Preview::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
answered yesterday
Mohit chauhanMohit chauhan
498111
498111
sorry for vendor/module mismatch i edited question, please checkout
– Praveen Negimani
yesterday
Please let me know your preview_product_gallery.xml file path in module ?
– Mohit chauhan
yesterday
Thank you for response. /public_html/app/code/vendor/module/view/frontend/layout
– Praveen Negimani
yesterday
add a comment |
sorry for vendor/module mismatch i edited question, please checkout
– Praveen Negimani
yesterday
Please let me know your preview_product_gallery.xml file path in module ?
– Mohit chauhan
yesterday
Thank you for response. /public_html/app/code/vendor/module/view/frontend/layout
– Praveen Negimani
yesterday
sorry for vendor/module mismatch i edited question, please checkout
– Praveen Negimani
yesterday
sorry for vendor/module mismatch i edited question, please checkout
– Praveen Negimani
yesterday
Please let me know your preview_product_gallery.xml file path in module ?
– Mohit chauhan
yesterday
Please let me know your preview_product_gallery.xml file path in module ?
– Mohit chauhan
yesterday
Thank you for response. /public_html/app/code/vendor/module/view/frontend/layout
– Praveen Negimani
yesterday
Thank you for response. /public_html/app/code/vendor/module/view/frontend/layout
– Praveen Negimani
yesterday
add a comment |
You can try this code .
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Retailinsights_Preview::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
</page>
add a comment |
You can try this code .
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Retailinsights_Preview::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
</page>
add a comment |
You can try this code .
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Retailinsights_Preview::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
</page>
You can try this code .
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<referenceBlock name="product.list.gallery">
<action method="setTemplate">
<argument name="template" xsi:type="string">Retailinsights_Preview::gallery.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
</body>
</page>
edited yesterday
mohit vamja
495
495
answered yesterday
Magento_BhurioMagento_Bhurio
1378
1378
add a comment |
add a comment |
You can't overwrite a theme file with a module.
The best and cleanest way to handle this is creating you own theme that extends the one you are currently using and then overwriting the template.
This seems like it's a bit overkill at the beginning, but it has the benefit of your parent-theme to be updateable.
Thank you for responce, Ill check it
– Praveen Negimani
yesterday
add a comment |
You can't overwrite a theme file with a module.
The best and cleanest way to handle this is creating you own theme that extends the one you are currently using and then overwriting the template.
This seems like it's a bit overkill at the beginning, but it has the benefit of your parent-theme to be updateable.
Thank you for responce, Ill check it
– Praveen Negimani
yesterday
add a comment |
You can't overwrite a theme file with a module.
The best and cleanest way to handle this is creating you own theme that extends the one you are currently using and then overwriting the template.
This seems like it's a bit overkill at the beginning, but it has the benefit of your parent-theme to be updateable.
You can't overwrite a theme file with a module.
The best and cleanest way to handle this is creating you own theme that extends the one you are currently using and then overwriting the template.
This seems like it's a bit overkill at the beginning, but it has the benefit of your parent-theme to be updateable.
answered yesterday
Philipp SanderPhilipp Sander
6801521
6801521
Thank you for responce, Ill check it
– Praveen Negimani
yesterday
add a comment |
Thank you for responce, Ill check it
– Praveen Negimani
yesterday
Thank you for responce, Ill check it
– Praveen Negimani
yesterday
Thank you for responce, Ill check it
– Praveen Negimani
yesterday
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267247%2fhow-to-override-custom-theme-phtml-file-by-custom-module%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You can't extend your theme file into your custom module, since magento 2 use fallback method so initially it will look up the file in your theme then into your custom module i.e., app/code... So in order to override your theme file create a child theme by parenting your current theme . In such a way you can extend I hope
– Prathap Gunasekaran
yesterday