Categories
Programming

Magento – Set Breadcrumbs via Layout XML

I have used this XML in custom modules and custom pages. It comes handy to pass the Breadcrumb information to Google.

[xml]
<reference name="breadcrumbs">
<action method="addCrumb"><crumbName>Home</crumbName><crumbInfo><label>Home</label><title>Home</title><link>/home</link></crumbInfo></action>
<action method="addCrumb"><crumbName>Sample Form</crumbName><crumbInfo><label>Sample Form</label><title>Sample Form</title><link>/forms/sample/</link></crumbInfo></action>
</reference>
[/xml]