English 中文(简体)
如何在Magento的所有网页上添加一厘米的静态块?
原标题:How to add a cms static block to all pages in Magento?

我是新来的,我正试图为我的家园、类别和其他网页制造一个固定的路障。 i 只想在脚本上显示静脉。 还有一条良好的路线,可以优于静态区块。 如何在中央人事管理系统中使用这些工具,以及我们如何利用《地方法典》来产生这些工具。

最佳回答

将法定和非法定区块直接添加到模板中:

<?php echo $this->getLayout()
->createBlock( cms/block )
->setBlockId( your_block_id )->toHtml(); ?> 

另一栏或数厘米页的短码:

{{block type="cms/block" block_id="your_block_id"}}

参见

问题回答
<?php 
    echo $this->getLayout()->createBlock( cms/block )->setBlockId( block_id )->toHtml(); 
    // toy can use this code in your template file.    
?>

用于贵厘米页的短码

{{block type="cms/block" block_id="your_block_id"}} 
// 用于贵厘米页的短码

在phtml文档中显示静态部分:

<?php 
    echo $this->getLayout()->createBlock( cms/block )->setBlockId( static_block_id )-toHtml(); 
?>

a. 在CMS网页上展示法定栏目:

{{block type="cms/block" block_id="my_block" template="cms/content.phtml"}}




相关问题
Magento addFieldToFilter allow NULLs

When using the Magento collection method addFieldToFilter is it possible to allow filtering by NULL values? I want to select all the products in a collection that have a custom attribute even if no ...

Get product link from Magento API

I am new to Magento and using their API. I need to be able to get the product url from the API call. I see that I can access the url_key and url_path, but unfortunately that s not necessarily what ...

magento extension installation

I want to install a Magento extension in WAMP, but not from the Magento connect system. How can I do this? I have the module (extension) code and I already installed the sample data in the Magento ...

Link to a specific step in onepage checkout

Is it possible to redirect the browser to nth step in the onepage checkout? If so, how would one go about doing it? I m working on a payment module and have a sort of "cancel" action that i would ...

How do I filter a collection by a YesNo type attribute?

I have a ‘featured’ attribute, which has a Yes/No select-list as the admin input. I presume that the values for Yes and No are 1 and 0, as they are for every other Yes/No list. However, if I try and ...

热门标签