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 votes
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
Community showcase
Published Tuesday in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

212 views 2 10
Read article

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