sitemap home issue

Posted by Community Admin on 03-Aug-2018 22:55

sitemap home issue

All Replies

Posted by Community Admin on 31-Jan-2012 00:00

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;
                
            
        

 

 

Posted by Community Admin on 03-Feb-2012 00:00

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

Posted by Community Admin on 03-Feb-2012 00:00

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.

This thread is closed