0

How can I cutoff my breadcrumbs at a certain length or at a specific node? My breadcrumbs are generated using SiteMapPath.

Example of what I want to achieve:

Site Collection > Site1 >Site2 > Site3

cutting it off at length 3 or at node "Site2" would yield this

Site Collection > Site1 >Site2

I know that it is possible to cutoff the parents by using ParentLevelsDisplayed, but this is not what I am looking for. Another solution could be to make a static breadcrumb. How would I go about this?

Thanks in advance!

  • Do you have problem with the size of the breadcrumb? I've made a js script that cuts out the "middle nodes" and turn them into "..." to save real estate. (js). Then you get somthing like Site Collection > Site1 > ...>...>...>Site10 – Plexus81 Aug 13 '14 at 10:30
  • It is not really a space issue, it is more of a design issue. There is a longer and boring explanation to why exactly I want it like this, that I will not be boring you with. However it must be possible to achieve this without too much effort. – Ringbo Aug 13 '14 at 10:44
0

Given you seem to have very specific requirement, the best way to do this is probably to turn of inheritence from parent sites and build each breadcrumb trail from scratch when you create the site. Its a little more time consuming than the inheritence method but it will give you exactly what you want.

  • I dont not think that is a good solution, since it is a huge and complex site, and it is only a small part of it that needs this customization. The rest is using the normal breadcrumb behaviour. The best solution I have so far is deleting the last nodes using javascript. – Ringbo Aug 13 '14 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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