Magento Forum

   
Moving breadcrumbs below page-head/category-head
 
georgek412
Jr. Member
 
Total Posts:  3
Joined:  2009-05-26
 

I’m building my first site using Magento, and am running into a problem with the bread crumbs. On the sub-pages and product-listing pages (basically everywhere but the home page) I’d like the breadcrumbs to appear between the page-head and the page content (and directly below the category-head on the product listing pages).

I’ve tried just dropping the

<?php echo $this->getChildHtml('breadcrumbs'?>
line after the
<h2><?php echo $this->getTitle() ?></h2>
line in page.phtml, but it doesn’t work.

Can anyone help with this problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

It is a block. The header is a different structural block to the main page column. As well as calling the block on the template file for the breadcrumbs you need to update your layout .xml files. I believe it is catalog.xml but I could be wrong. Open it up, move breadcrumbs down. What theme are you using?

 
Magento Community Magento Community
Magento Community
Magento Community
 
georgek412
Jr. Member
 
Total Posts:  3
Joined:  2009-05-26
 

I copied the default theme into a separate theme and have been modifying the files from there. I’ve been able to get along so far with my limited php knowledge, but these xml layout files confuse me. As I said, this is the first web site I’ve built in Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Appmerce
Guru
 
Avatar
Total Posts:  376
Joined:  2008-05-13
Amsterdam, The Netherlands
 

Put this in category/view.phtml

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

And in page.xml, wrap the breadcrumbs statement inside the content statement, like so:

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

And remove the old breadcrumbs statements, I had a conflict when having double statements.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top