Create block and pass data from XML layouts

For first create block PHP under Vendor/Module/Block1

Code should be like bellow

after create block you need pass some data to block. I wanna use XML for this

You can use this XML code on any layout like default.xml.

I hope this post helped you

Leave a Reply

Your email address will not be published. Required fields are marked *

÷ 2 = 1