Skip to main content
added 375 characters in body
Source Link
zamil
  • 632
  • 3
  • 12
  • 27

I am trying to create a new block for footer in page.xml

steps done are

<block type="page/html_newfooter" name="newfooter" as="newfooter" template="page/html/newfooter.phtml"> added in page.xml

I already havecopied the Mage/Page/Block/Html/Footer.php to 'local/Mage/Page/Block/Html/' and renamed to 'Newfooter.php' and renamed the class accordingly

<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml"> 

remains untouched in page.xml

the idea is to call two footers in two different layouts

I am calling new footer like following getChildHtml('newfooter') ?> in my new layout

and copied the Mage/Page/Block/Html/Footer.php to 'local/Mage/Page/Block/Html/' and renamed to 'Newfooter.php' and renamed the class accordingly

But its not working as expected . In both of my layouts either footer loads or newfooter loads irrespective of the layout i have selected for my pages.

I am refreshing cache every time. so that is not the issue

I am refreshingthink it is cache every timeissue. so that isAfter clearing cache if i load a page with footer then from there onwards all the pages will load footer. But if i load a page with newfooter then from there onwards all pages will load newfooter

I tried changing the cache_tags value in _construct but not getting the issueresult

I am trying to create a new block for footer in page.xml

<block type="page/html_newfooter" name="newfooter" as="newfooter" template="page/html/newfooter.phtml">

I already have

<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">

the idea is to call two footers in two different layouts

I am calling new footer like following getChildHtml('newfooter') ?> in my new layout

and copied the Mage/Page/Block/Html/Footer.php to 'local/Mage/Page/Block/Html/' and renamed to 'Newfooter.php' and renamed the class accordingly

But its not working as expected . In both of my layouts either footer loads or newfooter loads irrespective of the layout i have selected for my pages.

I am refreshing cache every time. so that is not the issue

I am trying to create a new block for footer in page.xml

steps done are

<block type="page/html_newfooter" name="newfooter" as="newfooter" template="page/html/newfooter.phtml"> added in page.xml

copied the Mage/Page/Block/Html/Footer.php to 'local/Mage/Page/Block/Html/' and renamed to 'Newfooter.php' and renamed the class accordingly

<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml"> 

remains untouched in page.xml

the idea is to call two footers in two different layouts

I am calling new footer like following getChildHtml('newfooter') ?> in my new layout

But its not working as expected . In both of my layouts either footer loads or newfooter loads irrespective of the layout i have selected for my pages.

I am refreshing cache every time. so that is not the issue

I think it is cache issue. After clearing cache if i load a page with footer then from there onwards all the pages will load footer. But if i load a page with newfooter then from there onwards all pages will load newfooter

I tried changing the cache_tags value in _construct but not getting the result

Source Link
zamil
  • 632
  • 3
  • 12
  • 27

creating new footer block in layout

I am trying to create a new block for footer in page.xml

<block type="page/html_newfooter" name="newfooter" as="newfooter" template="page/html/newfooter.phtml">

I already have

<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">

the idea is to call two footers in two different layouts

I am calling new footer like following getChildHtml('newfooter') ?> in my new layout

and copied the Mage/Page/Block/Html/Footer.php to 'local/Mage/Page/Block/Html/' and renamed to 'Newfooter.php' and renamed the class accordingly

But its not working as expected . In both of my layouts either footer loads or newfooter loads irrespective of the layout i have selected for my pages.

I am refreshing cache every time. so that is not the issue