0

I am trying to call breadcrumbs.phtml file twice through page.xml file. In page.xml breadcrumbs are added here

<block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">

   <block type="page/html_head" name="head" as="head">
     ...
   </block>

   <block type="page/html_header" name="header" as="header">
      <block type="page/template_links" name="top.links" as="topLinks"/>
      <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
      <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
        <label>Navigation Bar</label>
        <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
      </block>
      <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
        <label>Page Header</label>
        <action method="setElementClass"><value>top-container</value></action>
      </block>
      <block type="page/html_welcome" name="welcome" as="welcome"/>
  </block>

<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>

Breadcrumbs block can be found at bottom. Then in 2columns.phtml file it is called by

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

Now I want to call the breadcrumbs in header block as well or in header.phtml file. What I did is added breadcrumbs block in html_header

enter image description here and called it in header.phtml file via this code

<?php echo $this->getChildHtml('breadcrumbs.header') ?>

But breadcrumbs are not showing in frontend.

But when I removed the latter breadcrumbs block and then try to call it in header then it appears in header. I need to call breadcrumbs block twice. Please suggest what I should do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.