Our brands

Load Custom Extension Block

If you want to load any extension’s block without use layout xml, we can use the widget to make that.

For example: we want to load block type “Magento\Newsletter\Block\Subscribe”  – it will been call to block class file “vendor/magento/module-newsletter/Block/Subscribe.php

Please follow as this:

ves pagebuilder | load custom block widget guide

 

Widget options:

Addition Class: Custom Block css class, use for custom style for block

Block Type: Input the block type (it will call to module block class), same way of layout xml are calling.

On layout xml, the block are calling as this:

<block class=”Magento\Newsletter\Block\Subscribe” name=”form.subscribe” as=”subscribe” before=”-” template=”Magento_Newsletter::subscribe.phtml”/>

Block Name: input the name for the block as you want.

Block Parameters: You can input there param will use on the block. example:

template=’Magento_Newsletter::subscribe.phtml’

Share this Post!

Panda Thuan
Panda Thuan
Creativity is falling in love with the world

0 Comment

Do NOT follow this link or you will be banned from the site!