Confluence tip – how to hide child pages in the Documentation theme

This hint is for people who are using the Documentation theme in Confluence wiki, and want to hide the child pages that are shown at the bottom of every page. After all, the left-hand navigation bar in  the Documentation theme shows a page tree, including all parent and child pages. So it’s probably overkill to show the children at the bottom of every page too.

Confluence tip - how to hide child pages

To hide the child pages, add some CSS to the space. This is the CSS you need:

#children-section{   
display:none;   
}

I’ve tested the above CSS in Confluence 4.3 and 5.0.

To add the CSS to your space, you need space administrator permissions. Go to BrowseSpace AdminStylesheet, edit the stylesheet and dump the above code into the text box.

The documentation has more guidelines on using custom stylesheets: Styling Confluence with CSS.

Have fun!

About Sarah Maddox

Technical writer, author and blogger in Sydney

Posted on 24 February 2013, in Confluence, technical writing, wiki and tagged , , , , . Bookmark the permalink. 5 Comments.

  1. Thank you, Sarah. This was a very helpful tip.

    I clicked on your link, hoping to find more similar CSS settings like these, but I couldn’t find any.

    Is there a cheatsheet somewhere that I can use for such CSS settings?

    • Hallo Danny

      I’m glad this tip is helpful! Alas, I don’t know of any other hints on CSS for Confluence, aside from the page linked in this post and the child pages of that page. One idea would be to post the question at answers.atlassian.com. The community there is usually very helpful. For example, this search may pick up some useful tips and/or contacts.

      Cheers
      Sarah

  2. If you have a large number of children pages, then you might prefer to prevent the list from being rendered in the first place, instead of allowing them to be rendered and then hiding the output via css.

    If you do, this workaround works very well: https://answers.atlassian.com/questions/47875/how-to-remove-hide-child-pages

    You’ll want to put this code in the “Page Layout” (page.vmd) file. Access this in the confluence admin panel as follows:

    Confluence Admin -> Layouts (Under the “Look and Feel” heading in the left-hand navigation panel). Then look under “Content Layouts” then click the “Create custom” link under the “Operations” column next to the “Page Layout” item. (The “Page Layout” name is under the “Decorator” column).

    • Nevermind. This doesn’t work. Not sure why, but even after entirely removing the part of the code where it calls: #renderChildren(), the child pages are still being listed at the bottom of the parent pages in the space.
      Booo..

  1. Pingback: Hide Child Page List | luminescence

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: