I'm currently developing a eCommerce system with Magento. I have my footer called as <?php echo $this->getChildHtml('footer') ?>
and my layout.xml has following tags to define the 'footer'
<reference name="footer">
<block type="page/footer" name="footer">
<action method="setTemplate">
<template>page/html/footer_home.phtml</template>
</action>
<action method="setTemplate">
<template>muaw/footer_script.phtml</template>
</action>
</block>
</reference>
footer_home.phtml
is the actual footer and footer_script.phtml
is a file with <script>
tag for some jquery. My problem is that adding the second set of <action>
tags for footer_script.phtml
replace the actual footer. Is there any other way to get both files?
You don't need to set two templates for the footer. Just refrence your phtml file like so...
<reference name="footer">
<block type="page/footer" name="footer">
<action method="setTemplate">
<template>page/html/footer_home.phtml</template>
</action>
</block>
<block type="core/template" name="footer_script" template="muaw/footer_script.phtml"/>
</reference>
You should add footer_script.phtml to
<reference name="before_body_end">