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

Forums / Designing with Sitefinity / Breadcrumbs Customizing

Breadcrumbs Customizing

35 posts, 0 answered
  1. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    24 Sep 2010
    Link to this post
    Hello Ted,

    I am not able to reproduce the issues with the same project. In the code there are no checks for null, so you can add them and check what value is passed as node1.Url using VS debugger. The error is thrown, because somehow the node key is not a Guid which is required for CmsManager.GetPage() methods. I used the same project for testing and it is strange how you get this error on its pubic site.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  2. Ted
    Ted avatar
    28 posts
    Registered:
    08 Jan 2008
    24 Sep 2010
    Link to this post
    I'll see what I can come up with.  you say something about using visual studio debugger to see the value.  how can I do that if the sitefinity is on a remote server?
  3. Ted
    Ted avatar
    28 posts
    Registered:
    08 Jan 2008
    24 Sep 2010
    Link to this post
    OK.  I checked for a valid guid and that got me around that but if it wasn't a valid guid I just told it to get a new guid and then it doesn't know what the PageType is so I guess this won't work.

    would the guid be "invalid" if I changed the tree structure?  I had a home page and the group like this to start
    home
    groupA
        page1
        page2
        page3

    but I dragged groupA in the home directory to get the home to show in the breadcrumb but since then I have also noticed that my other menu that shows the "selected" page in a different color always shows the first node as selected along with the correct node so maybe dragging the menu in the tree like that messed something in the database up?
  4. Pravat
    Pravat avatar
    59 posts
    Registered:
    22 Jun 2010
    14 Feb 2011
    Link to this post

    Hi,
    As per my project requirement user should set the parent page id in custom breadcrumb.I am using Below code and getting error:- The 'namespace' attribute cannot be an empty string when i am drag and drop CustomBreadCrumb cntrol from naviagtion toolbox which i have configure.
    Please help.
    Regards,
    Pravat
    ----------------------------
    using
    System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Telerik.Cms.Web.UI;
    using Telerik.Cms.Web;
    using System.Web.UI.WebControls;
    using Telerik.Cms;
    using System.ComponentModel;
    public class CustomBreadCrumb : Breadcrumb
    {
    Guid pageID;
    public CustomBreadCrumb()
    {
    }
    [
    WebEditor("Telerik.Cms.Web.UI.DhlUrlEditor, Telerik.Cms" )]
    public string SetHomePage
    {
    get
    {
    object o = this.ViewState["SetHomePage" ];
    if (o == null )
    return UrlHelper .HomePage.Url;
    return (string )o;
    }
    set
    {
    this.ViewState["SetHomePage"] = value ;
    }
    }
    public string HomePageTitle
    {
    get
    {
    Guid pageID = UrlHelper .HomePage.ID;
    CmsManager manager = new CmsManager ();
    ICmsPage page = manager.GetPage(pageID) as ICmsPage ;
    object obj = this.ViewState["HomePageTitle" ];
    if (obj == null )
    return page.MenuName;
    return (string )obj;
    }
    set
    {
    this.ViewState["HomePageTitle"] = value ;
    }
    }
    protected override void InitializeItem(System.Web.UI.WebControls.SiteMapNodeItem item)
    {
    CmsSiteMapNode cmsNode = item.SiteMapNode as CmsSiteMapNode ;
    if (cmsNode != null )
    {
    HyperLink link = new HyperLink ();
    link.NavigateUrl = SetHomePage;
    link.Text = HomePageTitle + PathSeparator;
    Controls.Add(link);
    }
    base .InitializeItem(item);
    }
    private Guid m_pageId;
    private string m_StartUrl;
    [
    Browsable(false )]
    public Guid PageId { get { return this.m_pageId; } set { this.m_pageId = value ; } }
    [
    Browsable(false )]
    public string NavigateUrl { get { return this.m_StartUrl; } set { this.m_StartUrl = value ; } }
    }

     

  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Feb 2011
    Link to this post
    Hi ,

    I believe that the error is thrown on the first or second line. Please move use
    using System; on a single line.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
35 posts, 0 answered
1 2