我对此有点困惑。我有
<?php echo $this->getChildHtml('accountLinks') ?>
在 header.phtml 下。我如何在管理员的新静态 block 中调用“accountlinks”?
谢谢!
最佳答案
首先,检查所有 accountLinks
别名是否存在布局所有 xml 文件中。
假设
如果我发现 store_language
在 page.xml 中退出并且这在 header.phtml 中调用 $this->getChildHtml('store_language')
;
如果我想在任何使用下面代码的地方调用这个文件
echo $this->getLayout()->createBlock('page/switch')
->setTemplate('page/switch/languages.phtml')->toHtml();
你需要遵循同样的方式
关于php - Magento 在静态 block 中调用子 html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23214460/