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!
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.
> 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)
hello! how can i implemen this piece of code on a page? do i need. a macro? thanks
It looks like you're new here. Sign in or register to get started.