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.

  • 1
    You should view at magento.stackexchange.com/questions/91588/… . But you need change path of theme – Thao Pham Dec 11 '15 at 9:25
  • 1
    if you want overwrite file in core. copy file with structure same in core pass into app/design. – xanka Dec 11 '15 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 Dec 11 '15 at 9:40
  • Ok. I reply again – Thao Pham Dec 11 '15 at 9:48

With version 2.0.0 release(not Github), You should do as below

Copy templates need to make override in:


Location contain templates using to override:



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

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.