Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

What is the best way to create custom HTML for a breadcrumb (like SiteMapPath)?

share|improve this question
    
could you elaborate a bit more what you want to achieve? –  Anders Rask Apr 28 '10 at 17:40
    
I see the a standard SiteMapPath will give me a lot of <span>s and a custom PathSeperator, wrapped around another <span>. But what if I want to add a class to the first and last span (beside the wrapping one) –  eirikb Apr 29 '10 at 5:53
add comment

2 Answers

You need to have a custom Control to emit the html the way you want and add it in the PageLyout

share|improve this answer
    
So the best way to make custom HTML on existing constrollers in SP 2010 is to use Custom Control? Should I maybe extend SiteMapPath or something similar then? –  eirikb Apr 29 '10 at 5:54
    
I guess this is the answer then –  eirikb May 4 '10 at 5:40
add comment
up vote 0 down vote accepted

While Googleing I found this: http://johanleino.wordpress.com/2009/01/11/hiding-the-rootnode-in-a-breadcrumb-control-sitemap-path/ And by using <NodeTemplate>, <RootNodeTempalte> and CssClass I was able to solve my problems. In <RootNodeTemplate> I could even add <img /> to my HTML

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.