MENU

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.


Example:
[+] 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}{$hierarchy_item.name|default:''}
</div>
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}{$hierarchy_info.name}
</div>
Detail template
<div class="products_breadcrumbs">
  <a href="{root_url}">Home</a> &raquo; {$entry->breadcrumb} &raquo; {$entry->product_name}
</div>

Buy Me A Coffee


  Comment Form

ReviewManager

Click here to open the form

ReviewManager

  2 Comments

Buy Me A Coffee

CMS Made Simple - Tutorials, Tips and Tricks - CMSMS

Breadcrumbs for the Products module

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 1.11.13
  Last updated: 10-06-2019
  Comments: 2
  http://cms.ms/D8Jv


Buy Me A Coffee




Advertisement


Ads help me to help you! Thanks!

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