Video Lesson: Locate block templates in Magento

Locate block templates in Magento

This is premium content

Only available to enrolled or University students.
Join today to unlock all lessons in this course.

Locate block templates in Magento

Learn how to locate Magento block templates using CSS classes, data bind attributes, PhpStorm search and grep.

Lesson Content

When we created our blog post detail and sidebar templates, we wrapped the contents of these templates within a div, and specified a class for each element. When we inspect these elements with the browser dev tools, we will confirm this is outputted to the browser. Doing this allows your future self and others to easily locate where this is located on the filesystem.

We already know where these two templates are located, but let’s try to find a template that we do not know where it is located. Let’s inspect this Compare Products block. If we go up the DOM tree, we can see that it is located w...

Premium content

Enroll to unlock the full content and all course materials.

Maggie

Hey, I'm Maggie! πŸ‘‹

Ask me anything.

Want to chat with Maggie?

Enroll in this course for AI tutor access.

Comments

Join the discussion!

Comments

Want to comment on this lesson?

Enroll in this course to leave comments.