Review: Create and render a template within a block using layout XML in Magento
Learn how to create Magento blog post detail and sidebar templates and render them with layout XML containers.
Lesson Content
The last exercise challenged quite a few things you learned so far, including understanding how page layout handles are named, how page layouts are rendered with containers, how to create & organize your template files, and how to add blocks to differently named containers.
We’d like to make these changes to the /blog/post/detail route, to show some detail for our blog pages.
Our first step is to create the two new template files. Since they have to do with the /blog/post/detail route, we will create a new file in the post directory named detail.phtml. We’ll simply update the cla...
Join the discussion!
Comments
Want to comment on this lesson?
Enroll in this course to leave comments.