I had a long-standing issue with the breadcrumbs in Confluence showing up twice -- once for the space name and once for the home page. So, for a space called "Documentation", you'd get:
Dev Center > Documentation > Home
In this case, the "Documentation" and "Home" links would go to the exact same place.
After learning a little more jQuery, I was able to remove the "Home" breadcrumb by adding the following line in my Custom HTML "HEAD" section in the Admin panel:
AJS.$('#breadcrumbs li').eq(2).remove();
This basically removes the 3rd list item (li) in the unordered list (ul) called breadcrumbs.
Hope this helps someone else.
matt
Community moderators have prevented the ability to post new answers.
Asked and answered.
Replace eq(0) by eq(1) or the like to remove the home page name instead.
#breadcrumbs .first{ display:none; }
#breadcrumbs li::before { content: ""; display: inline-block; padding: 0 0 0 0; }
#breadcrumbs li::after{ content: "/"; padding: 0 2px 0 4px; }
To control numerous wiki spaces at once (but not all), you can make it obey a macro:
Produce the macro at
<script>
AJS.$(document).ready(function() {
AJS.$(".first").hide();
AJS.$(".second").hide();
});
</script>
This works (and the ".second" line seems to be unnecessary), but has the nasty side-effect that the "Browse", "" and wheel drop-down-menus become empty. How to solve that?
The above code AJS.$('#breadcrumbs li').eq(0).remove(); had no effect.
The "just in a single wiki space" code had no effect except the nasty side-effect.
(Credit: all the above codes are from this space, mainly by Eric Riddle and Kenn North. I just (C5.7-tested them and) wanted to make them accessible to a wider audience.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much for this post, I have been searching for ages for something that's clear and comprehensively explained. Much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had to put this at the END OF BODY section rather than the HEAD, for Confluence 4.2
As Matt mentioned, you can modify it to remove other breadcrumbs by changing the eq(2) to another number. For example, the following:
AJS.$('#breadcrumbs li').eq(0).remove();
Will remove the "Dashboard" breadcrumb. "0" is the first breadcrumb, "1" is the second, and so on.
I also modified it to only respond to users who were not logged in:
<script> if (AJS.$('#login-link').is(":visible")) { AJS.$('#breadcrumbs li').eq(0).remove(); } </script>
The above script will hide the dashboard link for a user who is not logged in.
Useful if you want to keep people in a specific space!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In Confluence 5.7 this worked for me when i added it at the END OF BODY as well. Does anyone know if this can be done but only for specific spaces and not globally? Thanks for the tip!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Within a specific space I added this to the CSS for that space #breadcrumbs .first{ display:none; } #breadcrumbs li::before { content: ""; display: inline-block; padding: 0 0 0 0; } #breadcrumbs li::after{ content: "/"; padding: 0 2px 0 4px; } It's not perfect, but it looks reasonable with very little effort.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would like to only remove a breadcrumb when there's redundancy. In pages that are not hierarchically under the home page, I don't want to remove a breadcrumb with out checking for redundancy.
This works:
AJS.$('#breadcrumbs li').eq(2).remove();
But I want something like this:
if (AJS.$('#breadcrumbs li:eq(2)').is(":contains('My Space Home')")) AJS.$('#breadcrumbs li').eq(2).remove(); }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BTW, I decided to completely rewrite the breadcrumb VM file instead of using jQuery to hack the way they are drawn. They are now much easier to work with and debug.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Our plugin Space Hierarchy & Breadcrumbs show the breadcrumbs having single entry of each space. It also provides option to create space hierarchy and breadcrumbs at top of page follow that hierarchy. you can try it to find if it suits your requirements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just chiming in to say 'thanks' - did the trick for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.