TransWikia.com

How to call phtml file on every page in magento 1?

Magento Asked on December 7, 2021

I am trying to call a phtml file on every page in magento 1 head section
is their any way we can perform it in magento 1 ?
I am using a theme.

One Answer

If you want to add phtml on all pages we can add it using layout

Create:

app/design/frontend/{Package}/{theme}/layout/local.xml

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

Noe create phtml at:

app/design/frontend/{Package}/{theme}/template/page/test.phtml

<?php echo "here"; ?>

Hope above will help!

Answered by Pawan on December 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP