2

Simple question, would it be possible to overwrite the templates in a 3rd party theme via the active theme?

I.e. if I have

/app/code/Vendor/SomeModule/view/frontend/templates/structure.phtml

would I be able to overwrite it via

/app/design/frontend/Me/MyTheme/Vendor_SomeModule/templates/structure.phtml

In the same way we could overwrite Magento_Modules?

1
  • please let me know if you have any issue Nov 30, 2016 at 9:08

1 Answer 1

2

Yes You can override at that way into design theme.

app/design/frontend/{Vendor}/{themename}/Namespace_Modulename/templates

Clear cache.

4
  • Hmm. It doesn't do anything. The module path is /app/code/Magefan/Blog/view/frontend/templates/post/list.phtml, so the correct path in my theme would be /app/design/frontend/My/Theme/Magefan_Blog/templates/post/list.phtml right? I've cleaned cache and all, it's not being read.
    – Asitis
    Nov 30, 2016 at 9:09
  • Yes, Its correct path, I have also override same module file in my custom theme. Its working fine. May be o\your content are coming from different files. please check it. Also remove var folder. Nov 30, 2016 at 9:14
  • i think your theme, My/Theme or My/MyTheme check your theme path. Nov 30, 2016 at 9:15
  • You're right :) Made a typo, this is working fine!
    – Asitis
    Nov 30, 2016 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.