Custom Breadcrumb MVC

Posted by Community Admin on 04-Aug-2018 17:15

Custom Breadcrumb MVC

All Replies

Posted by Community Admin on 06-Jan-2016 00:00

Hello,

I am just embarking on a new project in sitefinity and I am trying to create a custom breadcrumb widget using mvc only (no hybrids or stand controls in sitefinty).

Is it possible to create your own breadcrumb widget using only mvc? has anybody attempted anything similiar? where should I begin?

I have created the controller and view just don't really know where I should be pulling the data from pages or sitemapnodecollection?

Any help would be really appreciated.

Thanks

Paul

 

Posted by Community Admin on 11-Jan-2016 00:00

Hello,

The Feather MVC framework provides a breadcrumb MVC widget out of the box. The good news is that this framework is open source so you can easly get the source implementation. Follow the link to the file with a code demonstrating the solution for your question. The name of the method is GetBreadcrumbDataSource. It loads the pages in the breadcrumb. Basically you need an instance of SiteMapProvider that will tell you the page your widget is loaded in. - SiteMapProvider.CurrentNode. You can get a SiteMapProvider instance by using the following code :

SiteMapBase.GetSiteMapProvider(SiteMapBase.DefaultSiteMapProviderName);

You can specify a different provider name in case you want to create a site map based on a specific provider name: 
SiteMapBase.GetSiteMapProvider(this.SiteMapProviderName);

Regards,
Kaloyan
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 12-Jan-2016 00:00

Hello

Thanks for the response, yeah I discovered the feather project and used that as a basis.

Paul

Posted by Community Admin on 31-Aug-2017 00:00

Hi,

I have one doubt regarding the customization of breadcrumb widget.  In my customized new breadcrumb I have added one drop down field to choose the color of the breadcrumb.

Does anyone know how to change the color of the breadcrumb based on the selected value from the drop down?

This thread is closed