2013-07-24 43 views
0

好吧,所以我很难理解所有这些块的东西。无论我重读一篇文章多少次,我都无法理解它。Magento单独的页脚链接

我在footer_links静态块中关于我们,客户服务和隐私政策。我想在一个部分。 然后,我需要站点地图,搜索条件,高级搜索,订单和退货,以及在其他地方与我们联系。我发现Magento将两个页脚链接部分修补在一个块中。我希望他们在两个单独的块。

我该如何去做呢?

我想我知道如何为我想要的第三组链接添加另一个块,但我无法将这两个链接分开。

回答

2

阿任何人想要将它们分开,你把这个:

<?php echo $this->getChildHtml('footer_links') ?> 

<?php echo $this->getChildHtml('cms_footer_links') ?> 

第一种是由footer_links块定义的默认链接,然后cms_footer_links是CMS被称为footer_links静态块..这样你就可以定义多个块和使用cms_whatever_you_call_it =)

而在你local.xml中添加此:

<block type="cms/block" name="cms_footer_links" before="footer_links"> 
       <!-- 
        The content of this block is taken from the database by its block_id. 
        You can manage it in admin CMS -> Static Blocks 
       --> 
       <action method="setBlockId"><block_id>footer_links</block_id></action> 
      </block> 

课程的名称=“的C ms_whatever_you_call_it“:P

+0

在magento中包含像这样的链接集(或任何内容)的方法数量接近无穷大。直接调用一个静态块,可能比通过getChildHtml(这可能正是它所做的)更好。 – Bosworth99