{"id":1071,"date":"2013-03-13T07:52:21","date_gmt":"2013-03-13T07:52:21","guid":{"rendered":"http:\/\/invisiblezero.net\/?p=531"},"modified":"2013-03-13T07:52:21","modified_gmt":"2013-03-13T07:52:21","slug":"magento-creating-custom-breadcrumbs-for-cms-pages","status":"publish","type":"post","link":"http:\/\/ndthanh.com\/magento-creating-custom-breadcrumbs-for-cms-pages\/","title":{"rendered":"Magento – creating custom breadcrumbs for CMS pages"},"content":{"rendered":"
<\/p>\n
I wanted to create a subordinate set of CMS pages in Magento so that the breadcrumb navigation at the top of the page looks like this:<\/p>\n
Home > Parent CMS Page > Child CMS Page<\/p>\n
Even though I can specify a hierarchical relationship with the URL key field, it seems to be that all CMS pages in Magento are listed in the root directory by default:<\/p>\n
Home > Child CMS Page<\/p>\n
To override the default, you have 2 options :<\/p>\n
<\/p>\n
1. Update CMS page layout:<\/span> you must insert a bit of XML code into the CMS page’s Design > Page Layout > Layout Update XML field:<\/p>\n 2. Extend Magento breadcrums functions<\/span> to make it use hierarchy (from Magento EE version)<\/p>\n … will be updated shortly \ud83d\ude00<\/em><\/p>\n","protected":false},"excerpt":{"rendered":" I wanted to create a subordinate set of CMS pages in Magento so that the breadcrumb navigation at the top of the page looks like this: Home > Parent CMS Page > Child CMS Page Even though I can specify a hierarchical relationship with the URL key field, it seems to be that all CMS…<\/p>\n\n\n<reference name="root">\n\n<action method="unsetChild"><alias>breadcrumbs<\/alias><\/action>\n\n<block type="page\/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs">\n\n<action method="addCrumb">\n\n<crumbName>Home<\/crumbName>\n\n<crumbInfo><label>Home<\/label><title>Home<\/title><link>\/<\/link><\/crumbInfo>\n\n<\/action>\n\n<action method="addCrumb">\n\n<crumbName>Parent CMS Page<\/crumbName>\n\n<crumbInfo><label>Parent CMS Page<\/label><title>Parent CMS Page<\/title><link>\/parent-cms-page<\/link><\/crumbInfo>\n\n<\/action>\n\n<action method="addCrumb">\n\n<crumbName>Child CMS Page<\/crumbName>\n\n<crumbInfo><label>Child CMS Page<\/label><title>Child CMS Page<\/title><\/crumbInfo>\n\n<\/action>\n\n<\/block>\n\n<\/reference>\n<\/pre>\n