- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2021
11:05 PM
07-18-2021
11:05 PM
reuse a block in magento 2.4
Hey,
I am digging into Magento for several weeks. Anyone knows how to reuse a block such logo block. I want to it display in the header and footer.
Thanks
Labels:
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2021
08:10 PM
07-21-2021
08:10 PM
Re: reuse a block in magento 2.4
You would just call the block in the xml files
Reference the block
<referenceContainer name="main.content"> <block class="Amasty\Blog\Block\Content\Post\Details" name="blog_header_list" before="columns" template="Amasty_Blog::blog-header-list.phtml"/> </referenceContainer> <!-- custom override -->