[All Adaptavist Apps]

Page tree

This macrodefines where the list of child pages, if enabled, will be shownwithin the theme layout.

Unlike the children macro users can toggle the display of this macro using the link output by the menulink macro with a destination of children.

Usage

{builder-children}

Note:
This macro can only be used inside panels within the theme configuration screen. You cannot use it in pages or news articles, etc.

Parameters

This macro has no parameters.

Examples

Basic Use

Add the macro to any panel in theme configuration to display the children in that panel:

{builder-children}

CSS Customisation

To follow.

Hints and Tips

A common requirement is to only show child pages to users in a specific group such as content authors. This is really handy because it allows content authors to see additional navigation controls without cluttering up pages for normal visitors:

{show-to:groups=content-authors}{builder-children}{show-to}

We've used the show-to macro and set it up so that the the list of child pages are only shown to people in a "content-authors" user group (this group doesn't exist by default so you'd have to create it or use a different group).

Ideally you should also include the "confluence-administrators" group (which all administrators are added to automatically on Confluence installations that don't use LDAP):

{show-to:groups=content-authors,confluence-administrators}{builder-children}{show-to}

If you want a more flexible way of choosing which pages display a list of their child pages, you can use the builder-show macro in such a way as to only show the list when a specific label is added to the page, etc.

{builder-show:label=showchildren}{builder-children}{builder-show}

That would only show the list of child pages on pages that have a "showchildren" label.

Frequently Asked Questions

Why is the list of child pages not shown?

First of all, check that the following wiki notation is included in one of the theme panels:

{builder-children}

If it's not, then add it (wink)

Also, check that the panel which contains the macro is enabled - if the panel isn't shown, it's contents aren't shown.

If you have hidden the list of child pages (eg. using the "Hide Children" link), then they will not be shown on any pages until you re-display them again. There are a few ways you can display re-display them...

The best way is to use the menulink macro to display a link or menuitem that allows users to show/hide the list 1 :

{menuitem:flat=true}{menulink:children}Show child pages (%count%){menulink}{menuitem}

  1. This link is included as default on the View menu for pages that have child pages.

 

We've wrapped the link in the menuitem macro so that pages which do not have child pages will not display an inactive link.

Another approach is to include the showChildren=true setting on the page URL. For example, the URL to this page is:

http://www.adaptavist.com/display/AtlassianConfluence/builder-children+macro

You would change that to:

http://www.adaptavist.com/display/AtlassianConfluence/builder-children+macro?showChildren=true

Anyone accessing this link would automatically get the display of child pages switched on, regardless of what previous settings they had used.

 

See Also