Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 magento “Admin > CMS > Static Blocks”中,我创建了一个新的静态块。我试图弄清楚如何在我的标题模板中显示它。我没有成功。我对magento很陌生,对它并没有真正的深入了解。谢谢
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('product_banner')->toHtml() ?>
product_banner 是您要调用的静态块的 id(标识符)。将 product_banner 替换为您的 id。