Virtual BreadCrumb

In any site – Breadcrumb is essential as it helps user to understand where the content resides. This is the reason why content authors must make sure that contents are organized under proper nodes in Content Tree.

No comments
In any site – Breadcrumb is essential as it helps user to understand where the content resides. This is the reason why content authors must make sure that contents are organized under proper nodes in Content Tree.Virtual Breadcrumb236

Sometimes to make the content authoring easier – contents might have to be created outside the home node. This might break the connectivity between the items and the breadcrumb might look different. Lets take an example of products – As you can notice in above image , Product Landing page is present under Home Node which will indeed create a breadcrumb “Home >> Products ” Now lets have a look at the Product items,Virtual Breadcrumb660As you have identified – these items are created outside the Home node and under “Items” folder under the Site. The resultant Breadcrumb for Product Item will be “ Home >> Bus and Coach”. But how to bring this under Products, making it reside under products without moving it ?Let’s see how it is done:

1.Create a simple template called “Virtual Breadcrumb” and create below fields

Virtual Breadcrumb1046

2.Now create the items using Virtual Breadcrumb template :

Virtual Breadcrumb1106

3.In view rendering of breadcrumb – Let’s see how it is rendered

 

Virtual Breadcrumb1181

With simple query – we can find the item with the virtual crumb [Actual Path field ] and build the Ancestors !! Now our breadcrumb will look like “ Home >> Products >>Bus and Coach ”4.Now lets rewrite the URL as well to make sure “Items” folder is removed and replaced to “Products” Custom Link Provider to replace Items to Products

 

Virtual Breadcrumb1521

Custom Item ResolverVirtual Breadcrumb1545

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: