[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

This macro

Excerpt

defines where the list of child pages, if enabled, will be shown

within 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

Code Block

{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.

...

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

Code Block

{builder-children}

CSS Customisation

...

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:

Code Block

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

...

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

Code Block

{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.

Code Block

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

...

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:

...

Code Block
{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

...

Footnote

...

This

...

link

...

is

...

included

...

as

...

default

...

on

...

the

...

View

...

menu

...

for

...

pages

...

that

...

have

...

child

...

pages.

...

:

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

...

Footnotes Display

Image Added

 

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