1

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/debug-theme.html

I am following the magento docs to create a theme for practicing, it shows me how to find these things but I would like to know what is the difference between templates and layouts in magento before I start overriding them

1 Answer 1

4

Layouts are the XML files that specify the overall structure of a page like the position of header, side columns, and footer, etc.

The Layout Object is an XML object that will define which Blocks are included on a page, and which Block(s) should kick off the rendering process.

Templates are pieces of code in PHTML (PHP) files which add features and contents that you see on the front page.

A template in Magento is a layout only for certain pages. A template can be used for pages where you need completely different look or You just simply want to display left and right sidebar when a theme has only one sidebar.

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.