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!

1 Answer 1

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 :).

2
  • I just wonder about it now! ended upon this answer. Wonder ended :) thanks @Marius Aug 25, 2014 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? Jul 14, 2016 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.