Advanced Breadcrumbs in ShopSite

Questions and answers about ShopSite Custom Templates

Advanced Breadcrumbs in ShopSite

Postby accrete » Sat Nov 10, 2012 11:53 pm

I was reading another post where the OP asked about creating a better path for the breadcrumbs on pages.
Lauren's reply:
ShopSite Lauren wrote:3 - You aren't doing anything wrong, ShopSite doesn't have a way of displaying a parent category for a sub category (no way to determine which parent category page a sub page is assigned to, and could be assigned to multiple pages), so the breadcrumbs will only ever go 2 tiers on pages, and 3 tiers on product more information pages. There are tricks to getting around this but it requires modifying the template.

http://support.shopsite.com/forums/viewtopic.php?f=1&t=9108&p=24060&hilit=breadcrumbs&sid=f2b0d62fbfc97e019684ce3459d20871#p24060

What are the tricks? :wink:

Info pages are fine like this:
Home >>Page Name

But it would be better if these where like this:
Store Pages other than Info pages:
Home >> Main Category >> Sub Category

Products:
Home >> Main Category >> Sub Category >> Product
accrete
 
Posts: 11
Joined: Sat Nov 10, 2012 11:05 pm

Re: Advanced Breadcrumbs in ShopSite

Postby Jim » Mon Nov 12, 2012 12:42 am

You might try looking at this page http://www.shopsite.com/templates/cookbook/tips-breadcrumbs.shtml and see if that helps.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Advanced Breadcrumbs in ShopSite

Postby accrete » Mon Nov 12, 2012 1:38 am

Thanks but that doesn't show the whole path. The quote I included in my post was a hit that you can do beyond that with some tricks. The question was what are the tricks.
accrete
 
Posts: 11
Joined: Sat Nov 10, 2012 11:05 pm

Re: Advanced Breadcrumbs in ShopSite

Postby Jim » Mon Nov 12, 2012 9:48 am

Essentially what you would need to create is a "State machine" that kept track of exactly where each page is in the publish process and record the entire path to each page. There are a couple of problems with doing that. 1. a page can be assigned to multiple other pages, so how do you determine which path was followed to get to where you currently are? (Note the pages are static html so it can't change after the page is generated) 2. item 1 could be accomplished if you did a complete publish each time you published your store but when you do a partial publish (by clicking the publish tab) only the particular pages/products that need to be published are generated so you will not have all of the info necessary to generate the full bread crumb.

The easiest solution is to use one of the extra page fields to contain the bread crumb for a particular page. You would just create the breadcrumb manually and add it to the extra page field for each page and then display that page field for the bread crumb.

It might be possible to do more by saving the state using VAR's if you do a complete publish but since partial publishes are done so frequently it would probably not work well for more than the 2 levels mentioned in the Bread crumb help I mentioned in the last post.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Advanced Breadcrumbs in ShopSite

Postby accrete » Mon Nov 12, 2012 1:04 pm

Jim wrote:The easiest solution is to use one of the extra page fields to contain the bread crumb for a particular page. You would just create the breadcrumb manually and add it to the extra page field for each page and then display that page field for the bread crumb.

This would seem like the easiest for the average user of ShopSite/reader of this forum.

Thanks for the idea. This will add better usability to the store.
accrete
 
Posts: 11
Joined: Sat Nov 10, 2012 11:05 pm


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 8 guests

cron