5

I have often seen breadcrumb definitions in controllers that solely manage backend pages, e.g. /app/code/core/Mage/Adminhtml/controllers/CatalogController.php

But I have never actually seen a breadcrumb on a backend page. How come? Am I missing something? Or am I just blind? :-)

Is there an existing usage anywhere or are the definitions done just in case somebody wants to implement them in the backend?

Thanks in advance!

Celldweller
  • 967
  • 3
  • 15
  • 26

1 Answers1

8

I've been wondering the same thing for a while.
Here is my conclusion: This is just an other unfinished Magento feature like there are others (see the <layout version="0.1.0"> discussion for example).
I base my conclusion on the fact that on in the admin page file (page.phtml) there is no line that should show the breadcrumbs. It should be something like this:

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

But the main reason that lead to my conclusion is this method in the breadcrumbs block:

protected function _beforeToHtml()
{
    // TODO - Moved to Beta 2, no breadcrumbs displaying in Beta 1
    // $this->assign('links', $this->_links);
    return parent::_beforeToHtml();
}

If you add the line <?php echo $this->getChildHtml('breadcrumbs') ?> in page.phtml and uncomment $this->assign('links', $this->_links); in the method above you should see the breadcrumbs but not all the pages will have correct breadcrumbs. See for example the add/edit product page. This is because the breadcrumbs are not added in all the pages.
I guess we have to wait for the Beta 2 as stated by the comment in the code above :).

Marius
  • 197,939
  • 53
  • 422
  • 830
  • I just wonder about it now! ended upon this answer. Wonder ended :) thanks @Marius – Rajeev K Tomy Aug 25 '14 at 13:01
  • It's three years later and in the Magento 2 backend I still see references to adding breadcrumbs in controllers, but I have yet to see a single breadcrumb rendered in the admin despite seeing the method included in official Magento 2 books' tutorials. I wonder what the developers are intending by including this feature, but not displaying them by default. What's the point? – Jonathan Eltgroth Jul 14 '16 at 18:22