in Magento 1.x you could duplicate the extensions to app/design/frontend/themeName/default/template/or/layout and then modify it's layout or functionality via xml or phtml files.
How do we duplicate and edit certain modules now in M2? I have looked over the docs but couldn't find this info. For example i wish to edit phtml of module-catalog/view/frontend/templates/product/gallery.phtml correct way by having theme based module overwrite and now edit core modules within vendor/magento*/ folder.
Thanks for the help.
-
1You should view at magento.stackexchange.com/questions/91588/… . But you need change path of themeLinoPham– LinoPham2015年12月11日 09:25:48 +00:00Commented Dec 11, 2015 at 9:25
-
1if you want overwrite file in core. copy file with structure same in core pass into app/design.xanka– xanka2015年12月11日 09:27:02 +00:00Commented Dec 11, 2015 at 9:27
-
Thank you both, exactly what i needed. Biil, can you pass that with an answer so i can mark it as correct?g5wx– g5wx2015年12月11日 09:40:32 +00:00Commented Dec 11, 2015 at 9:40
-
Ok. I reply againLinoPham– LinoPham2015年12月11日 09:48:52 +00:00Commented Dec 11, 2015 at 9:48
1 Answer 1
With version 2.0.0 release(not Github), You should do as below
Copy templates need to make override in:
vendor/magento/<module_name>/view/frontend/templates
Location contain templates using to override:
app/design/frontend/<Vendor_Theme>/<name_theme>/Magento_<module_name>/templates
Example
You want override a template in: vendor/magento/module-catalog/view/frontend/templates/product/list.phtml
You create a file have path as: app/design/frontend/<Vendor_Theme>/<name_theme>/Magento_Catalog/templates/product/list.phtml