Monday 31 March 2014

How to display breadcrumbs on Magento Sitemap ?

You can easily add the breadcrum in sitemap using below 2 ways

  1. <?php 
        echo $this->getLayout()->getBlock("breadcrumbs")->
                  ->addCrumb('CrumbName', array('label' => 'this will appear as link text', 'title' => 'title attribute of link', 'link' => 'url to the page)
                  ->toHtml()
    ?>
    
    
    
    
    OR
    
    
  2. <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
        <action method="unsetChild"><alias>breadcrumbs</alias></action>
        <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs">        
          <action method="addCrumb"><crumbName>Name</crumbName><crumbInfo><label>Test</label><title>Test</title><link>/test.html</link></crumbInfo></action>
        </block>
    </reference>

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home