Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

how to make breadcrumbs render link path, instead of parent/child relationship


Reply


1123 Views

Avatar
ChrisBryer

Community Member, 95 Posts

14 November 2008 at 10:32am

Edited: 14/11/2008 10:33am

hi everyone,
i have a products page which can be accessed from 2 different ways...

1) navigate through the site tree. go from home- to the 'product holder' page - to the products page (this mirrors what is in the CMS site tree)

2) navigate via relationships - go from home to a 'marketsHolder' page which shows different markets and related products, which link to the products.

my problem is when i navigate to the products page via the many-many-relationship (going through 'markets'), the breadcrumbs show the parent/child relationship that mirrors the siteTree, and does not show the markets path. I saw hammy's thread:
[url]http://www.silverstripe.com/site-builders-forum/flat/221309[/url]
but that approach looks like it would make the breadcrumbs always go through the relationship and not consider that the products can be navigated to by 2 different paths.

i considered trying to dynamically create a new page and dump the contents of the product page into it, but that may show up on google-analytics as 1 product with 2 urls, so i think re-writing the breadcrumbs is the way to go.

if anyone has any ideas on how to solve this, i would love to hear them.
thanks alot,
-Chris