want to call one phtml file in another phtml file using anchor tag

前端 未结 6 813
迷失自我
迷失自我 2021-02-06 16:47

I\'m using Magento.

I want display and call one phtml file as a link in another phtml file…

I have the new.phtml file on t

6条回答
  •  既然无缘
    2021-02-06 17:27

    Use the below code for rendering your phtml file in another phtml file.

    getLayout()->createBlock('core/template')->setTemplate('templatefolderpath/filename.phtml')->toHtml(); ?>
    

    For more refinement of your code, you can use the block name and block file name instead of core/template because core/template use the core resources.

提交回复
热议问题