Breadcrumbs for the Products module

  Previous article Next article  

There isn't one method for adding a breadcrumb trail to the Products module for CMS Made Simple™.
Climbing down the 'hierarchy ladder' to the product, you pass three templates and each template has its own method.

[+] Hierarchy 1 (Hierarchy template)
   [+] Hierarchy 1.1 (Hierarchy template)
     [+] Hierarchy 1.1.1 (Summary template)
       [ - ] Product (Detail template)

  How to use

Add to the Products module templates:

Hierarchy template
<div class="products_breadcrumbs">
  {products_hierarchy_breadcrumb hierarchyid=$hierarchy_item.parent_id|default:'' assign=tmp}
  <a href="{root_url}">Home</a> &raquo; {if $tmp != ''}{$tmp} &raquo; {/if}{$|default:''}
Summary template
<div class="products_breadcrumbs">
  {products_hierarchy_parent hierarchyid=$actionparams.hierarchyid assign=tmp}
  {products_hierarchy_breadcrumb hierarchyid=$tmp assign=tmp2}
  {$hierarchy_info = $Products->GetHierarchyInfo($active_hierarchy)}
  <a href="{root_url}">Home</a> &raquo; {if $tmp2 != ''}{$tmp2} &raquo; {/if}{$}
Detail template
<div class="products_breadcrumbs">
  <a href="{root_url}">Home</a> &raquo; {$entry->breadcrumb} &raquo; {$entry->product_name}

Buy Me A Coffee

  Comment Form

Click here to open the form


Buy Me A Coffee

CMS Made Simple - Tutorials, Tips and Tricks - CMSMS

Breadcrumbs for the Products module

  Article optimized for CMSMS 2.x

  Last tested in: CMSMS 1.11.13
  Last updated: 10-06-2019
  Comments: 2

Buy Me A Coffee


Ads help me to help you! Thanks!

Ads help me to help you! Buy products from these advertisers!