2

In Magento 1 if I wanted to modify my own version of a phtml file I would move it into the theme directory, while maintaining the same structure. I have needed to do this on a single Magento instance that has multiple store views and uses different themes.

An example would be

app/design/frontend/base/default/template/page/html/breadcrumbs.phtml

Being added into

app/design/frontend/argento/<my_theme>/template/page/html/breadcrumbs.phtml

When viewing the website, my updated template would be used and not affect any other store views I have. This method didn't require any xml updates, or technical wizardry, which suited me perfectly.


Magento 2 seems to be structure quite differently The breadcrumbs file is held within

vendor/magento/module-theme/view/frontend/templates/html/breadcrumbs.phtml

A slider file is here

app/code/Swissup/EasySlide/view/frontend/templates/slider.phtml

Where would these need to be placed to display using my own theme, which is below

/app/design/frontend/Local/<my_theme>
0

Rewrite in module template file in custom theme

/app/design/frontend/Namespace/<my_theme>/Swissup_EasySlide/templates/slider.phtml

Note:: some time need to move the layout file too

/app/design/frontend/Namespace/<my_theme>/Swissup_EasySlide/layout/

run this cmd php bin/magento setup:static-content:deploy

  • Perfect ... the 'Swissup_EasySlide' is now working :) Can you also tell me where I would put vendor/magento/module-theme/view/frontend/templates/html/breadcrumbs.phtml – Jay Pea Oct 31 '16 at 12:41
  • Just remove view/frontend folder from structure rest is same – Qaisar Satti Oct 31 '16 at 17:43

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.