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...
Join the discussion!
Comments
Want to comment on this lesson?
Enroll in this course to leave comments.