template
-
February 16, 2023
In the previous video, we’ve created functionality with you which allows us to delete a post from a database.
If you miss the previous series of videos, don’t worry! Click here to join Magento 2 Blog FREE course with the last 11 videos.
In this video, we will create functionality allowing us to render and show a blog page on a storefront. We’re going to:
- Create front end controller that will be responsible for the rendering
- Create a template
- Attach a template to the layout XML file
- Render information from a PHP file from a template on our page.
Discover a new part of our Blog creation playlist in the video.
-
August 16, 2022
From the Template and Layout Rendering lesson, we've learned how to create a new template and render it on a custom page with the help of a layout. As you've noticed, the template provides HTML markup with static text.
<h1>My First Template</h1> <p>With Layout support</p>
This code might be enough for a static website, but not for Magento 2. In this lesson, we will learn how to pass data from the PHP side, specifically from an Action Controller to the template.
By the end of this lesson, you will know one of the ways how to render dynamic content on a page.
Lesson Overview