The Adaptavist Group LogoDocumentation

Sorted Children

The Sorted Children macro displays a sorted list of child pages.

Usage

Storage Format

<ac:macro ac:name="sorted-children">
<ac:parameter ac:name="parameter">value</ac:parameter>
</ac:macro>

Wiki Markup

{sorted-children:parameter=value}
ParameterNameDescriptionTypeDefaultRequired
rootpageRoot page The page or space whose children should be shown (defaults to the current page)Possible values:
  • SPACEKEY:pagename - a specific page in a particular space
  • pagename - a specific page in the current space
  • @self - the current page
  • @current - same as @self
  • @parent - the parent of the current page
  • @parentparent - the parent of the current page's parent
  • @orphan - as an orphaned page in the current space
  • @space - same as @orphan
  • @root - the root of the current page's tree
  • @home - the homepage of currently viewed space
confluence-content@current
filterFilterOnly display spaces of the given typeenumsorted
classCSS ClassThe CSS class to add to the wrapperstring
depthDepthThe depth of children to displaystring1
showRootShow RootInclude the root page in the displaybooleanfalse
showPageSiblingsShow Page SiblingsShow the siblings of the root page - when displaying the path from @dashboard, @parent, @parentparent, @space, @orphan, @root or @homebooleanfalse
showSpaceSiblingsShow Space SiblingsShow the siblings of the spacesbooleanfalse
countParentPagesCount Parent PagesInclude parent pages in the depth countbooleanfalse
countParentSpacesCount Parent SpacesInclude parent spaces in the depth countbooleanfalse
flagFlagA list of flags, one of which must be defined for the content to be displayedstring
notflagNot FlagA list of flags that must not be defined for the content to be displayedstring

Basic Example

Create a simple list of all child pages.

<ac:macro ac:name="sorted-children" />
{sorted-children}

Using this will result in the following list:

Advanced Example

A list of child pages with custom CSS to style links and indents. This is suitable for tree-style navigation.

<ac:macro ac:name="sorted-children">
  <ac:parameter ac:name="showRoot">true</ac:parameter>
  <ac:parameter ac:name="rootpage">@home</ac:parameter>
  <ac:parameter ac:name="class">myclass</ac:parameter>
  <ac:parameter ac:name="filter">all</ac:parameter>
  <ac:parameter ac:name="depth">3</ac:parameter>
</ac:macro>
{sorted-children:showRoot=true|rootPage=Adaptavist Documentation Home|class=myclass|filter=all|depth=3}

The following CSS should be added in the ThemeBuilder Custom CSS editor:

/* remove disc, margin and padding on list */
ul.myclass {
    list-style: none;
    margin: 0;
    padding: 0;
}
/* add padding to the list elements for spacing */
.myclass li {
    padding: 2px;
}
/* add padding to the child elements to produce indent */
.myclass li.child {
    padding: 2px 2px 2px 20px;
}
/* make the current page link bold */
.link.current.myclass.actual.page {
    font-weight: bold;
}

Using this markup will result in the following:

Search documentation

Start typing to search the docs.