There are following way to add breadcrumbs
1. From layout files
Suppose the layout file for you module is present in design/frontend/default/default/layout/custommodule.xml.
Now, open the layout xml file of your module. You must see the node named default. Write the following code inside the default node or suppose, you have an address page for you module. The test page will have the node named something like YourModule_index_test.
<reference name="breadcrumbs">
<action method="addCrumb">
<crumbName>Home</crumbName>
<crumbInfo><label>Home</label><title>Home</title><link>/</link></crumbInfo>
</action>
<action method="addCrumb">
<crumbName>Test</crumbName>
<crumbInfo><label>Test</label><title>Test</title></crumbInfo>
</action>
</reference>
1. From layout files
Suppose the layout file for you module is present in design/frontend/default/default/layout/custommodule.xml.
Now, open the layout xml file of your module. You must see the node named default. Write the following code inside the default node or suppose, you have an address page for you module. The test page will have the node named something like YourModule_index_test.
<reference name="breadcrumbs">
<action method="addCrumb">
<crumbName>Home</crumbName>
<crumbInfo><label>Home</label><title>Home</title><link>/</link></crumbInfo>
</action>
<action method="addCrumb">
<crumbName>Test</crumbName>
<crumbInfo><label>Test</label><title>Test</title></crumbInfo>
</action>
</reference>
No comments:
Post a Comment