+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom Breadcrumb MVC

Custom Breadcrumb MVC

3 posts, 0 answered
  1. Paul
    Paul avatar
    13 posts
    Registered:
    29 Jul 2015
    06 Jan
    Link to this post

    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

     

  2. Kaloyan
    Kaloyan avatar
    11 posts
    Registered:
    19 Sep 2016
    11 Jan
    Link to this post
    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
     
  3. Paul
    Paul avatar
    13 posts
    Registered:
    29 Jul 2015
    12 Jan in reply to Kaloyan
    Link to this post

    Hello

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

    Paul

3 posts, 0 answered