Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Is there an Exception Option for the Children Display Macro?

When editing the 'Children Display' macro there is not an edit option for excluding child pages I don't want listed based on the rules I set in the options. It would be a helpful addition to the edit options.

Thank you!

4 answers

I also would like an exclude option for the children display macro. It is sometimes useful to display all the children of the current page's parent - all its siblings, and maybe its nieces and nephews. You can do that by naming the parent page in the children display macro, but the current page is included in the results, which is ugly.

0 votes
Zak Laughton Atlassian Team Jul 30, 2018

Hi Jennifer!

Unfortunately, there's not a way to exclude child pages in either the Children Display macro or the Page tree macro. The Content by Label and Search Results macros both return filtered lists of pages, and may work as alternative options (depending on your requirements).

I found a suggestion ticket for the functionality to exclude pages from the Children Display macro here: CONFSERVER-43198. The ticket was closed by Product Management due to lack of activity, but you can still vote and comment on the ticket to give our developers more meaning surrounding the issue to possibly be fixed according to the Implementation of New Features Policy.

Thanks!
-Zak

I also would like an exclude option for the children display macro. It is sometimes useful to display all the children of the current page's parent - all its siblings, and maybe its nieces and nephews. You can do that by naming the parent page in the children display macro, but the current page is included in the results, which is ugly.

This is exactly the same thing I want!

I looked at the two feature request tickets, and the mechanisms and policies for upvoting were confusing. So I'm leaving my +1 here in the meantime.

+1

Hi,

I am by no means a developer, but this piece of code does exactly this. You can modify it to show the links too.

## @param noShowLabel:title=Label|type=string|desc=Label of pages to exclude

#macro(childrenList $parentPage)
#set($childpagesSub = $parentPage.getSortedChildren())
#set($childrenN = $childpagesSub.size())
#if($childrenN > 0)
<ul>
#foreach($page in $childpagesSub)
#set($noShow=0)
#set($pageLabels = $page.getLabels())
#foreach($pageLabel in $pageLabels)
#if($pageLabel == $paramnoShowLabel)
#set($noShow=1)
#end
#end
#if($noShow==0)
<li>$page.getTitle()</li>
#childrenList($page)
#end
#end
</ul>
#end
#end

#childrenList($content)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

⚡️NEW Group for Confluence Cloud Admins

Calling all Confluence Cloud Admins!  We created a new Community Group to support your unique needs as Confluence admins. This is a group where you can ask questions, access resou...

137 views 2 10
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