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

Forums / General Discussions / sitemap home issue

sitemap home issue

3 posts, 0 answered
  1. Rajesh
    Rajesh avatar
    13 posts
    Registered:
    11 Jan 2012
    31 Jan 2012
    Link to this post
    hi,

    i am using the sitemap for the pages and i can see the pages >home,pages >xyz >abc
    so my question is how can i change the pages  to home.
    well i found the solution for that but in that case the home page shows two home like Home >Home
    my requirment is :-
    1. Home > xyz >abc
    2. i dont want any thing on home page. currently i am getting Pages >home.if i use below code i get Home >Home (both shows the hyperlink right now)

    i have attached two images as well that shows the current issue. also i am attaching the image after i use this code.
    can you please help me to fix the issue.
    void smp_Breadcrumbs_ItemCreated(object sender, SiteMapNodeItemEventArgs e)
            {
                if ((e.Item.ItemIndex == 0) && (e.Item.ItemType == SiteMapNodeItemType.Root) && (e.Item.Controls.Count > 0))
                {
                    if (e.Item.Controls[0] is HyperLink)
                    {
                        ((HyperLink)e.Item.Controls[0]).Text = "Home";
                        ((HyperLink)e.Item.Controls[0]).ToolTip = "";
                    }
                }
                else if (e.Item.ItemType == SiteMapNodeItemType.Current)
                {
                    if (e.Item.Controls[0] is Literal)
                    {
                        Telerik.Sitefinity.Web.PageSiteNode pageSiteNode = (Telerik.Sitefinity.Web.PageSiteNode)e.Item.SiteMapNode;
                        Telerik.Sitefinity.Modules.Pages.PageManager manager = new Telerik.Sitefinity.Modules.Pages.PageManager();
      
                        Telerik.Sitefinity.Pages.Model.PageNode pageNode = manager.GetPageNode(pageSiteNode.Id);
      
                        ((Literal)e.Item.Controls[0]).Text = pageNode.Title.Value;
                    }
                }
            }
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    16 Aug 2017
    03 Feb 2012
    Link to this post
    Hi,

    Can you please let us know which control you're using for your breadcrumbs navigation?. generally you could specify ShowStartingNode = "false" which should fix the issue.  I believe you might also find this forum thread useful.

    Kind regards,
    Boyan Barnev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. Rajesh
    Rajesh avatar
    13 posts
    Registered:
    11 Jan 2012
    03 Feb 2012
    Link to this post
    Thanks Boyan,

    i have resolved it.
    i override the breadcrumbs control and used the below code then i got home > home twice on home page.
    finally i add the below code on page load in the user control.
     if (SiteMap.CurrentNode.Title == "Home")
                {
                    SiteMapPath1.Visible = false;
                }

    so it fixed the problem.
    Thanks for the response.
3 posts, 0 answered