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>


  Comment Form

Click here to open the form


  2 Comments

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: 02-04-2018
  Comments: 2
  http://cms.ms/D8Jv

Advertisement



Ads help me to help you! Thanks!

Ads help me to help you! Thanks!

Ads help me to help you! Thanks!