繁体   English   中英

通过local.xml在页脚中调用Custom phtml

[英]call Custom phtml in footer through local.xml

我在local.xml中的代码

<?xml version="1.0"?>
<layout version="0.1.0">
        <reference name="footer">
            <block type="core/template" name="site_access" as="site_access" template="folder_name/popup.phtml"/>
        </reference>        
</layout>

=> footer.phtml

<?php echo $this->getChildHtml(); ?>

但是它什么也没显示,请帮助我。

将代码放入local.xml()(app / design / frontend / {您的主题} /default/layout/local.xml)

<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="footer">
<block type="core/template" name="mylogic" template="mylogic/mylogic.phtml"/>
</reference>
</default>
</layout>

写在你的footer.html

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM