Video Lesson: Challenge: Create and render a template within a block using layout XML in Magento

This is premium content

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

Challenge: Create and render a template within a block using layout XML in Magento

Learn to create and render Magento blog detail and sidebar templates using layout XML blocks.

Lesson Content

Now that you know how to create a template and render it with a block... why don’t you try it for yourself for the blog detail view?

On this blog detail view, we’ll eventually display the blog content, but also want to display a sidebar template with a list of other related blog posts. For this task, create two templates: one for the main blog post detail content, and another for the sidebar.

Choose the appropriate names for each template, and create each containing placeholders that just output “Blog detail” and “Blog sidebar” respectively.

Make sure the sidebar template is rendered...

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.