【发布时间】:2020-11-23 09:15:53
【问题描述】:
下面这段代码用于从/app/code/模块调用模板。
$gridHtml = $block->getLayout()->createBlock(
'\Magento\Framework\View\Element\Template',
'custom_grid_new'
)->setTemplate('Magento_CustomGrid::product/view/templates/grid.phtml')
->toHtml();
如何从以下路径设置模板
/app/design/frontend/Magento/luma/Custom_Grid/templates/grid1.phtml
在上面的代码中试过这个,但没有用。
【问题讨论】:
标签: magento magento2 magento-2.3