Page 1 of 1

Product Manager - "Breadcrumb' style navigation bar

Posted: Sun Aug 02, 2009 4:01 pm
by BenedictPorter
I am currently working on a site - which you can see here in development.

I would like to create a navigation bar which appears at the top of my pages that acts in a similar way to a breadcrumb trail. I have managed to cobble something together which works at the moment but only because you can drill-down in one category only. If all the categories allowed drill-down to product detail the nav-bar as is will break.

Ultimately what I am after is HOME >> CATEGORY >> HIERARCHY >> PRODUCT NAME or something similar.

Any hints or tips will be appreciated,

Thanks.

Re: Product Manager - "Breadcrumb' style navigation bar

Posted: Sun Aug 02, 2009 5:53 pm
by BenedictPorter
I'm using the Product Manager module for this site.

Re: Product Manager - "Breadcrumb' style navigation bar

Posted: Sun Aug 02, 2009 6:16 pm
by BenedictPorter
Yeah, I found that. However, it only works with the hierarchy and doesn't include navigation links (At least it doesn't for me. Maybe I've done something wrong).

Re: Product Manager - "Breadcrumb' style navigation bar

Posted: Fri Aug 07, 2009 7:49 am
by BenedictPorter
I'm still not having much luck with this.

If anyone has any ideas or tips it would be much apprenticed.

Thanks

Re: Product Manager - "Breadcrumb' style navigation bar

Posted: Fri Aug 07, 2009 10:22 am
by BenedictPorter
This is what I have developed so far:

Code: Select all

<h2 class="category-title">

<!-- link home -->
<a class="home" href="/"><span>Home</span></a>


<!-- link to parent category -->
<!-- detail template -->
{if isset($entry->categories)}
{foreach from=$entry->categories item='category'}
<a class="category"><span>{$category->name}</span></a>
{/foreach}
{/if}  


<!-- link to age group -->
{if isset($hierarchy_item.name)}
<a class="hierarchy"><span>{$hierarchy_item.name}</span></a>
{elseif isset($entry->breadcrumb[1])}
<a class="hierarchy"><span>{$entry->breadcrumb[1]}</span></a>
{/if}

<!-- product name -->
{$entry->product_name}

</h2>
There are numerous issues:
1) There is no navigation at this time, just a breadcrumb trail, which is better than nothing.
2) The category does NOT appear when I view a summary list of a particular category only when I view the product detail which gives me the desired result of CATEGORY >> HIERARCHY >> PRODUCT NAME.
3) I only want to display a single category for the product I am viewing, at the moment I get all the categories for the product display. How can I get rid of {foreach} and just display the category I am viewing?

Any ideas to develop this further?

[SOLVED - Kinda] Re: Product Manager - "Breadcrumb' style navigation bar

Posted: Tue Aug 11, 2009 8:52 am
by BenedictPorter
I have managed to partially solve this with a user defined tag and a couple of global content blocks.

Clunky but it works!

Re: [SOLVED - Kinda] Product Manager - "Breadcrumb' style navigation bar

Posted: Thu Aug 13, 2009 10:38 am
by MarkFresh
Hi

Could you let me know how you did this as I'm having the same problem

Thanks

Mark

Re: Product Manager - "Breadcrumb' style navigation bar

Posted: Mon Sep 07, 2009 4:35 pm
by BenedictPorter
Looks like this didn't work after all.

I upgraded the Products module and what I had broke.

I am working on a fix but I am once again stuck.