It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do you Hide children of a page?

Dan Moran Oct 30, 2011

I see that there are two views for Viewing Children - Show and Hide - that can be configured globally by a site admin.

But WHERE are they configured? HOW is this done?

We use the Documentation theme, and have tried temporarily switching to the Default theme so that we could edit the site's Page Layout and changing #renderChildren() to ##renderChildren(), but that didn't work.

3 answers

1 accepted

0 votes
Answer accepted
Dan Moran Nov 02, 2011

Hi Joseph,

Thanks for the tip - I didn't realize (as a brand new user) that I could apply that HTML code to a Space. In fact, I'm able to do so even without Enabling Custom Stylesheets for Spaces. Perhaps it's my privilege level?

In any event, I seem to have a "syntax" problem. When I enter the HTML code (see above) in a Space Stylesheet, the Labels: field on all pages in the Space is hidden, but the Child Pages still display. However, if I place the #labels line before the #children line in this HTML code, the Child Pages are hidden and the Labels: field displays!

Also, if I remove either the #children line or the #labels line from the HTML code, both the Child Pages and the Labels: field display on all pages.

I'm THAT CLOSE to getting this to work - any suggestions?



2 votes
Danielle Zhu Nov 01, 2011

#renderChildren() is the right place. Make sure you do not have space level theme, layout or style that overwrites the global theme and the custom layout. e.g. In Space Admin Theme, you need to use Global Look and Feel, instead of selecting the Documentation theme.

Dan Moran Nov 02, 2011

Hi Danielle,

Page 310 of the Confluence 3.5 user guide has a screenshot where a site administrator can select to hide hildren globally. This is the screen I'd like to get to - but how do I get there? Is this screen no longer part of Confluence?

(I'd also like to hide the Labels: field that displays above the list of Child Pages.)



Danielle Zhu Nov 02, 2011

I saw the screenshot you are referring to but that looks like a wiki page with children, not a global setting. As far as I know, there is no site wide setting to select whether to show or hide children by default. Here is an open request for "Option for hiding children by default":

Dan Moran Nov 02, 2011

Hi Danielle,

OK, thanks for the link - maybe the hide children option will be available some day.

Meanwhile, I can go to each Parent Page and enter the following HTML code to hide the Child Pages and the Labels field:



#children-section { display: none; }

#labels-section {display: none; }



(I actually read about using this code only to hide the Child Pages and guessed that I could add a similar line to hide the Labels: field, and it worked!)

I appreciate your quick replies to my questions.


Joe Clark Atlassian Team Nov 02, 2011

Instead of manually adding HTML to each page, you could use a custom Space stylesheet to apply it automatically to all pages -

Dan Moran Nov 04, 2011

Hi Joseph,

It finally dawned on me that if I placed two copies of the above HTML code in a Space Stylesheet, and in one copy flip-flopped the #children and #labels lines, both the list of CHiled Pages and the Label: filed would be hidden on all pages in that Space. And sure enough it worked.

It seems like a funny way to do it, but I got the result I wanted.

1 vote
Paul Paul Nov 06, 2011

Put it in a user macro, add macro to the page you want to see this action. Globally, just add to custom HTML in admin ( I would opt to use body).

David Simpson Community Leader Nov 06, 2011

This is a very similar to the technique I used in More flexible commenting in Atlassian’s Confluence.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

968 views 0 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you