Include template into another template in Magento2

In this topic we describes the way to include template file into another template. Subscribe to Bethos for all the Magento2 problems and customizations. Using getTemplateFile method: If you need to include phtml template file into another phtml, Magento provides a inbuilt function called getTemplateFile. For example: Here is my first template app/code/Bnethos/Example/view/frontend/templates/mainTemplate.phtml

In … Read more