3

You should try this echo $this->getLayout()->createBlock("Vendor\Module\Block\Myblock")- >setTemplate("My_Module::history-suite.phtml")->toHtml();


3

Add your block in default.xml and in checkout_index_index.xml write below code: <referenceBlock name="form.subscribe.home" remove="true" /> It will solve your issue.


2

I've found a solution pretty simple. $block = $result->getLayout()->setData(['test'=> 'Content here'])->getBlock('category.description'); $block->setTemplate('Vendor_Module::myTemplate/blank.phtml') ->toHtml(); Then my blank.phtml: <?php print_r($this->getData()) ?> It prints: Array ( [test] => Content here [module_name] =&...


1

You need to build objects which you then pass through to email templates. https://magento.stackexchange.com/a/283338/70343 If it's a custom template then it's going to be custom code passing the variables.


1

Try this code instead: echo $this->getLayout() ->createBlock("Magento\Directory\Block\Currency") ->setTemplate("Magento_Directory::currency.phtml") ->toHtml(); This should work anywhere in any phtml


1

As i see a problem with cms block associated with the method \Experius\DonationProduct\Block\Donation\ListProduct::getIdentifier. The problem is that when we get the block name in cms, we get a name that contains an element "\" that can not be properly processed. Please try change method getIdentifier for that return str_replace('\\', '-', parent::...


Only top voted, non community-wiki answers of a minimum length are eligible