Magento Breadcrumbs Custom Pages – Adding Breadcrumbs to Custom Pages in Magento

Magento Breadcrumbs Custom Pages – Adding Breadcrumbs to Custom Pages in Magento

In this post we will show you how to add Magento Breadcrumbs Custom Pages. In magento we will show you how to creat Custom Breadcrumbs for your Custom Pages.

For Magento Breadcrumbs Custom Pages are exceptionally valuable for client navigation/route. Breadcrumbs for item page, classification page, and so on are made of course Magento code.The taking after code will indicate breadcrumbs made by Magento. we can print the accompanying code anyplace in php or phtml records.

// Magento Breadcrumbs Custom Pages
// echo breadcrumbs data
echo $this->getLayout()->getBlock('breadcrumbs')->toHtml();

we can create over own breadcrumbs as well. Like, we may need to create breadcrumbs if we have your own custom built module. I will show we here, how we can do it.

It’s simple and easy. At first, we will define the breadcrumbs block. Then, we will add label, title and link to your breadcrumbs. The addbreadCrumb Magento function is used in this case.

// get breadcrumbs object
// Magento Breadcrumbs Custom Pages
$_getbreadcrumbs = $this->getLayout()->getBlock('breadcrumbs');

$_getbreadcrumbs->addbreadCrumb('home', array('label'=>Mage::helper('cms')->__('Home'), 'title'=>Mage::helper('cms')->__('Home Page'), 'link'=>Mage::getBaseUrl()));

$_getbreadcrumbs->addbreadCrumb('country', array('label'=>'Country', 'title'=>'All Countries', 'link'=>'http:// onlinecode/magento/onlinecodeName/country'));

$_getbreadcrumbs->addbreadCrumb('manufacturer', array('label'=>'State', 'title'=>'States'));
// echo breadcrumbs data
echo $this->getLayout()->getBlock('breadcrumbs')->toHtml();

The name, title and connection can be changed by your need and prerequisite.

we can utilize another strategy to make breadcrumbs to your custom page by utilizing just xml record.

we have to pronounce the breadcrumbs reference hinder in relating handler of a xml file,for case see the accompanying code.


	
			
			Home
			
			Home 	/
	
	
			
			authors
				
			Authors 	/index.php/managingusers/index/authorlist
	
	
			
			searchlist
				
			SearchList 	
	

You may also :: How to Use Magento 2 CMS

Leave a Comment

Your email address will not be published. Required fields are marked *

3  +  1  =  

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US