breadcrumbs?

4 posts by 2 authors in: Forums > CMS Builder
Last Post: August 23, 2011   (RSS)

By rez - August 22, 2011

When creating categories in a category menu, setting the parent category shows a list like:

catering : beverages

This works well. I have two categories named beverages. One is on a regular menu, one is on a catering menu.

I have a category menu, then another table for the items. Each item is assigned a category with the advanced name and num list.

But, when an administrator/ editor looks at the list of items, they see the category "beverages" for both the catering and regular menu. No breadcrumb (if thats what you mean by breadcrumb). Also, when assigning each item a category in the drop list for items, its the same thing. One flat list. Any way around this?

Re: [Jason] breadcrumbs?

By rez - August 22, 2011

Oh, I see. That's perfect.

How can I remove the parents on the viewer? Normally, I would use:

<?php echo $items['category:label'] ?>

but in various situations, I won't want the breadcrumbs, just the current category.

Re: [rez] breadcrumbs?

By Jason - August 23, 2011

Hi,

You can get the last element from the bread crumb like this:

<?php
$breadcrumbArray = explode(":",$items['category:label']);
$label = trim(@$breadcrumbArray[count($breadcrumbArray)-1]);
?>

<?php echo $label;?>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/