Hiding sidebar and menu-bar at top (need help !)

We want to incorporate a space with application information into our operational software. The goal is that users can see this information without the need to log in to Confluence and without the left hand sidebar and menu-bar at the top.

For this my colleague has created a script that we added to the Main layout decorator for the space. We inserted this at the end of HEAD.  The script is as follows:

    //If the sidebar is visible, hide it and the split bar...
    if (AJS.params.remoteUser == '' && AJS.$("div.ia-fixed-sidebar").width() > 0 ) {
      // hide the sidebar area (including space tools)
      // ...then change the width and position of the content
      AJS.$('div.aui-page-panel').css({'width':'100%', 'left':'0', 'margin-left':'0'});

The script works fine but only partly. We achieved that the sidebar is removed. The menu bar is also gone. We also managed to hide the footer (this is in another part of the decorator). We still see the bread crumbs and the page title.

The problem is that when we scroll down on a larger page, the content moves over the bread crumbs. The bread crumbs themselves also move up but only a little bit. When we scroll up again we don't see the title anymore.
Refreshing the page bring us back to were we started (obviously)

In addition to that, we still are missing is the following.

  • center the page
  • limit the width to 960px

When we add code for this, we create some other problems. Somehow the breadcrumbs move to the right hand site instead of staying on the left hand site.

Does anyone have a solution? 

We use Confluence 6.0.





1 answer

0 vote
Brant Schroeder Community Champion Oct 18, 2017

I think you should just use CSS.  You could identify the regions you would like to hide and use display:none property.  Center the information and setting a maximum width could also be controlled with CSS.

I actually was hoping if somebody has a code available.....

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,925 views 27 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you