To render one .phtml template inside another template, insert the following code at the desired location:
|
1 2 |
// Insert the search field anywhere in a template echo $this->getLayout()->createBlock("Magento\Framework\View\Element\Template")->setTemplate("Magento_Search::form.mini.phtml")->toHtml(); |