How to Call Core Template File In Magento.?
Call Core Template File In Magento:
When working with custom HTML integration in Magento you need to call core template files in Magento. There are two steps to do this with specific that are explained below.
These are two steps to call the Core Template file in Magento
Method 1:-Call a core template file from .phtml file:-
- Create your .phtml file and keep it under the custom folder app/design/frontend/default/yourtheme/template/Your _Template _Folder_name.
<?php echo $this->getLayout()->createBlock(‘core/template’) ->setTemplate(‘templatefolder/yourtemplate.phtml’)->toHtml(); ?>
Step 2:- Calling this file from admin panel CMS page.
- Now login to your Magento Admin Dashboard
- navigate to CMS > Pages from the main top navigation menu and then select the page to use the below code.
{{block type=”core/template” template=”templateFolder/yourtemplate.phtml”}}