[Solved] Hierarchy with no item in Products Module

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
makhatri
Forum Members
Forum Members
Posts: 31
Joined: Sun Jul 14, 2013 11:02 am

[Solved] Hierarchy with no item in Products Module

Post by makhatri »

Hir1 --- > Hir11---> 0 item

How to show Breadcrumb in summary template of Products module, if hierarchy is empty (no product associated with Hir11). When I click on Hir11, this variable is empty ($items).
I can get the Breadcrumb by $entry->breadcrumb if $items variable has values.

Edit:
I put the below condition before <a href .... in hierarcy template

Code: Select all

{if $item.count>0 || is_array($item.children)}
      <a href="{$item.url}">{$item.name} </a>
{else}
      {$item.name}
{/if}
-MAk
Post Reply

Return to “The Lounge”