How to modify the breadcrumb navigation bar for Confluence from fixed to relative? (default server)

Maja Kovats February 22, 2019

My question is very similar to this question:

https://community.atlassian.com/t5/Confluence-questions/How-do-I-modify-the-breadcrumb-navigation-bar-for-Confluence/qaq-p/722445

However, our instance is server and we are not using any third-party breadcrumb add-ons.

I've added this script to the HEAD so that unregistered users can't access irrelevant areas of Confluence (I only want them to see the relevant knowledge base for this product).

<script>
AJS.toInit(function(){
if (AJS.params.remoteUser == ''){
AJS.$('#header').hide(); // remove header
AJS.$('#breadcrumbs li:first').remove(); // remove the dashboard link
AJS.$('#breadcrumbs li:first').addClass('first'); // remove the pointer before the next link
}
});
</script>

Now the breadcrumb menu follows you down the page as you scroll, i.e. it is fixed. This makes some content harder to read.

The breadcrumb menu doesn't seem to do this when the #header is not hidden.

I would like the breadcrumb menu to be relative.

I hope these images are illustrative:

img1.png

img2.png

1 answer

1 accepted

1 vote
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 25, 2019

Hello Maja,

Thank you for providing great detail into what you’re attempting to accomplish along with that you have done on the way. I went through your notes and screenshots and was able to replicate this on Confluence 6.14. I did find the cause of the stop space between scrolling down and up within a page. That space is due to the system add-on named Confluence Fixed Headers. I found attempting to adjust some of the settings were quickly ignored due to this add-on. More disabling this addon may be found at How to Disable Global Fixed Header in Confluence 5.9 and Above.

Alternatively, you may use a marketplace add-on to resolve this issue. A marketplace add-on will also ensure that your look and feel of Confluence will continue to work while being supported via the vendor. While your Javascript may work in this version, a future release may cause the script to break during an upgrade.

I hope this proves helpful in tailoring your content for anonymous users.

Regards,
Stephen Sifers

Maja Kovats February 25, 2019

Hi Stephen,

Thank you for this solution, it does resolve the issue.

Alternatively, you may use a marketplace add-on to resolve this issue. A marketplace add-on will also ensure that your look and feel of Confluence will continue to work while being supported via the vendor. While your Javascript may work in this version, a future release may cause the script to break during an upgrade.

I would also prefer this, I actually like the fixed header-- it just behaviors oddly with my script.

I couldn't find any apps that readily tailor Confluence for anonymous users. I'm sure a theme-related/turn-Confluence-into-a-website type app could do so, but I don't want to put effort into figuring out a whole new theme just for this one use case.

If anyone has any suggestions for apps, please let me know! I did try Visibility for Confluence (https://marketplace.atlassian.com/apps/202/visibility-for-confluence?hosting=cloud&tab=overview)-- but its not quite what I'm looking for.

Thanks,

Maja

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events