当前位置: 动力学知识库 > 问答 > 编程问答 >

php - Display topLinks in the footer AS WELL as the header

问题描述:

I am adapting the theme Magento Modern to use as a new theme and I need to display the topLinks found in the header in the footer as well. I have found one or two posts trying to show what to do but I have failed to actually get this to work. Can someone provide a simple way for me to insert this block into the footer, making sure it also stays in the header.

网友答案:

Fortunately, this can be done using layout update directives because the standard footer block template echoes all children. It is important to use the original topLinks block instance as its content is updated by multiple modules. You can add these by creating a local.xml file in your custom theme and insert()ing the block to the footer:

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <reference name="footer">
        <action method="insert">
            <block>top.links</block>
        </action>
    </reference>
</layout>
分享给朋友:
您可能感兴趣的文章:
随机阅读: