Video Lesson: Create a custom layout XML file in Magento

Create a custom layout XML file in Magento

This is premium content

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

Create a custom layout XML file in Magento

Learn how to create a custom Magento layout XML file in view frontend layout blog_post_list.xml.

Lesson Content

To create a layout XML file, we’ll first create the directory structure in our custom module.

All layout XML files go in a view/frontend/layout directory. If the layout XML files are defined anywhere else, Magento won’t be aware that the files exist.

Next comes the XML file named specific for our front, controller & action name. Since our URL is redirecting to the /blog/post/list URL, our file will be named blog_post_list.xml.

Within this file is the standard XML prolog, along with the <page> node. It’s pretty common to grab this tag from one of the core Magento modules, or sa...

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.