Page layout declares the wireframe of a page inside the <body> section, for example one-column layout or two-column layout.
The allowed layout instructions are:
<container>
<referenceContainer>
<move>
<update>
If we want to include a additional template file in home page, we can do it by adding the following layout update at cms design layout update section at admin.
<referenceContainer name="footer">
<block class="Magento\Framework\View\Element\Template" name="nameofblock" template="Magento_Theme::template_name.phtml"/>
</referenceContainer>
Here we are including "template_name.phtml" at footer container section.
The phtml template file should be under the templates folder of the module of our theme. Here the template is inside the module "Magento_Theme" under our theme.
If we want to include the template from static blocks section at admin, add the following block at the static block content.
{{block class="Magento\Framework\View\Element\Template" name="nameofblock" template="Magento_Theme::template_name.phtml"}}
The allowed layout instructions are:
<container>
<referenceContainer>
<move>
<update>
If we want to include a additional template file in home page, we can do it by adding the following layout update at cms design layout update section at admin.
<referenceContainer name="footer">
<block class="Magento\Framework\View\Element\Template" name="nameofblock" template="Magento_Theme::template_name.phtml"/>
</referenceContainer>
Here we are including "template_name.phtml" at footer container section.
The phtml template file should be under the templates folder of the module of our theme. Here the template is inside the module "Magento_Theme" under our theme.
If we want to include the template from static blocks section at admin, add the following block at the static block content.
{{block class="Magento\Framework\View\Element\Template" name="nameofblock" template="Magento_Theme::template_name.phtml"}}
Comments
Post a Comment