简体   繁体   中英

call Custom phtml in footer through local.xml

My code in 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(); ?>

but it does not display anything, pls help me.

Put code in local.xml() (app/design/frontend/{your theme}/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>

write this in your footer.html

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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