Breadcrumbs for the Products module

  Previous article Next article  

Breadcrumbs for the Products module

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 1.11.13
  Last updated: 02-03-2015
  Comments: 2

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>

A2 Webhosting CMS Made Simple


A2 Webhosting CMS Made Simple

  Comments

  Click here to leave a comment






This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)
  « Enter the CAPTCHA code (lower case)

Your IP address will be stored on submit. I reserve the right to change or delete your response without notice!
In case of abuse your IP address will be blocked!


Can I have your attention for a moment?

Did this tutorial help you solving a problem at your (clients) website and it saved you many hours of work? Great!!
Consider buying Rolf a cup of coffee in return! [ Click here ]


  2 Comments

CMS Made Simple 2.2.2 - Tutorials, tips and tricks - CMSMS 2.2.2

Breadcrumbs for the Products module

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 1.11.13
  Last updated: 02-03-2015
  Comments: 2

A2 Webhosting CMS Made Simple