Organize module templates and theme templates in Magento
Learn how Magento organizes module templates and theme templates to separate functionality and presentation for easier customization and maintenance.
Lesson Content
Magento separates templates and themes into different organizational structures to maintain a clean separation of concerns. Understanding this helps you place files exactly where Magento expects to find them.
Templates (Module-Based)
Templates that are part of modules are defined in the module's directory structure:
app/code/Vendor/Module/view/
├── [frontend|adminhtml]/templates/ # PHP templates (.phtml)
└── [frontend|adminhtml]/web/template/ # Knockout templates (.html)These files include both .phtml templates (PHP-based) and .html templates (used w...
Join the discussion!
Comments
Want to comment on this lesson?
Enroll in this course to leave comments.