Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Need help moving breadcrumbs
 
jcef13
Jr. Member
 
Total Posts:  6
Joined:  2013-04-30
 

I am having some trouble moving my breadcrumbs to appear below the

<div class="page-title"></div>
on my pages.  Per a suggestion on another thread, I removed
<?php echo $this->getChildHtml('breadcrumbs'?>
from the 2columns-left.phtml page.  I then added
<?php echo $this->getLayout()->getBlock('breadcrumbs')->toHtml(); ?>
to the page.phtml.  Nothing changed at all!

Does anyone have an idea of the best way to move breadcrumbs position within the content itself?  This can be seen at http://theballhogg.com/index.php/catalog/category/view/id/8

Any help would be greatly appreciated!

 
Magento Community Magento Community
Magento Community
Magento Community
 
nickcarter21
Jr. Member
 
Total Posts:  23
Joined:  2013-04-02
 

Hi

It looks like you are trying to move the breadcrumbs inside the content area which is being rendered by <?php echo $this->getChildHtml(\'content\') ?>

1. Create a local.xml inside your theme directory with below xml snippet.

<layout version=\"0.1.0\">

        <default>
    
        <
reference name=\"root\">
            <
action method=\"unsetChild\"><name>breadcrumbs</name></action>
            <
reference name=\"content\">
                <
action method=\"insert\"><child>breadcrumbs</child></action>
            </
reference>
        </
reference>
        
    </default>
    
    <
catalog_category_default>
        <
reference name=\"content\">
            <
action method=\"unsetChild\"><name>breadcrumbs</name></action>
            <
reference name=\"category.products\">
                <
action method=\"insert\"><child>breadcrumbs</child></action>
            </
reference>
        </
reference>
    </
catalog_category_default>
    
    <
catalog_category_layered>
        <
reference name=\"content\">
            <
action method=\"unsetChild\"><name>breadcrumbs</name></action>
            <
reference name=\"category.products\">
                <
action method=\"insert\"><child>breadcrumbs</child></action>
            </
reference>
        </
reference>
    </
catalog_category_layered>

</
layout>

2. Open catalog/category/view.phtml inside your theme directory
3. Insert <?php echo $this->getChildHtml(\'breadcrumbs\') ?> below <div class=\"page-title\"></div>.

eg :

<div class=\"page-title category-title\">
    
<?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
        
<a href=\"<?php echo $this->getRssLink() ?>\" class=\"link-rss\"><?php echo $this->__(\'Subscribe to RSS Feed\'?></a>
    
<?php endif; ?>
    
<h1><?php echo $_helper->categoryAttribute($_category$_category->getName(), \'name\'?></h1>
</
div>

<?php echo $this->getChildHtml(\'breadcrumbs\'?> // add here

<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>

this will automatically remove the default breadrumbs and add them to content area (<?php echo $this->getChildHtml(\'content\') ?>).
since the page-title is hardcoded in most of the templates inserting the breadcrumbs between page-title and content will be tricky and will require lot of work. Below xml snippet will do the trick for category pages only. you will need to do more for the rest.

do let me know if you need any further help

cheers smile

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