Anyone able to suppress the Child Pages/Page Tree section in the sidebar using the CSS or Javascript in this article?

Michael Reese March 9, 2016

Saw this article https://confluence.atlassian.com/confkb/how-to-hide-elements-in-confluence-using-css-or-javascript-313458894.html

We're using Confluence 5.9.  None of the items in the article seem to affect the sidebar content.  We are using the Spacetree macro to display pages instead, and the workspaces were originally created with the Documentation theme, which did not display the Child Pages/Page Tree section in the sidebar.    Now, we want to change to the default theme so we can use the JIRA links button feature in the workspaces.  But now the Child Pages display in the sidebar, below the Spacetree listing, and clutter up the section.

1 answer

1 accepted

0 votes
Answer accepted
Robert Ortner March 9, 2016

I removed nearly all content by adding the following Space Stylesheet

# change layout of in out block
.bvPB_panelContent {
  border-style:solid;
  font-size:20px;
  text-align:center;
}
.confluenceTh, .confluenceTd {
  border:1 solid lightgrey;
  padding:5px 5px;
  text-align:center;
font-weight: bold;
}
# remove statusline on top
#header .aui-header {
  background-color:#FFFFFF;
  color:#292929;
  display:none;
}

#remove header and other stuff
body.theme-documentation #header .aui-header {
  display:none;
}
#title-heading.with-breadcrumbs img {
  display:none;
}
.page-metadata ul li {
  display:none;
}
body.theme-documentation #header .aui-header {
  display:none;
}
element.style {
  display:none;
}
#pagetreesearch form input.text {
  display:none;
}
#pagetreesearch form input.aui-button {
  display:none;
}
#comments-actions.aui-toolbar {
  display:none;
}
#comments-section .quick-comment-container.add {
   display:none;
}
body.theme-documentation #footer .footer-body {
 
  display:none;
 
}

But be aware - to edit the layout later you have to know the link to change the space layout

 

www.something.com/spaces/choosetheme.action?key=SPACESHORTNAME&src=spacetools

 

perhaps it helps

Michael Reese March 10, 2016

I copy/pasted this into the Stylesheet, and saw some item disappear in the actual page (the "Created by" and "last modified" info, and the "Write a comment..." box), but the sidebar remains the same.  I'm not an HTML expert, but it seems these types of functions don't work for items in the sidebar.

Robert Ortner March 11, 2016

ok - you are right - when I remember right, there was a difference between several browsers, removing the sidebar once using chrome fixed the problem permanent, IE never worked. I´ll give it a try this weekend, perhaps I can find a solution.

 

best Robert

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events