Create Child

This tool creates child pages using a macro.

Usage

There is no visible content when this macro is used on a page. When the page is saved, a new child page is created. This macro is useful for automatically generating hierarchies from templates.

Basic

Users create a new page using a Create Child macro template in place. With the option Render selected, that first template will generate two pages: one parent and one child.

  • Parent

    • Child

Advanced

The new page is called Colorsand the template contains 5 Create Child macros, each with a different page title: Red, Blue, Green, Yellow, Purple. The resulting pages will be:

  • Colors (parent)

    • Red

    • Blue

    • Green

    • Yellow

    • Purple

Storage Format

<ac:macro ac:name="create-child"> <ac:parameter ac:name="parameter">value</ac:parameter> </ac:macro>

Wiki Markup

{create-child:parameter=value}

Parameter

Name

Description

Type

Default

Required

pagetitle

Page Title

The page title that should be used for the created page

string


parent

Parent Page

The page where the child should be created defaults to the current page

Possible values:

SPACEKEY:pagename - a specific page in a specific 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

@self

once

Only Once

Only create the page once; if the page gets deleted, do not attempt to re-create it

boolean

false

template

Template

The template to use when creating the page (may be a space, a Global template, or a skin resource)

Possible values:

LAYOUTID::resource.ext - a resource in a specific layout

@current::resource.ext - a resource in the current layout

@parent::resource.ext - a resource in the parent of the current layout

SPACEKEY:pagename - a specific page in a specific space

@current:pagename - a specific page in the current space

pagename - a specific page in the current space §

templatename - the name of a space or Global template §

§ The pagename / templatename selectors route through a series of fall-back situations. The source for the template is first checked against any editable-text objects with that name in the current space. Then Global Editable Text is checked, followed by a page in the existing space with that name, then a Space template in the current space. After that, a Global template will be looked for. Finally, a builder resource. with specific extensions (.xml/.hxtml/raw/HTML/wiki) will be looked for and privately depending on the resource’s extension.

NB: Confluence blueprints (e.g., Meeting Notes) are not accessible through the template parameter. string


render

Render

Whether to render the resultant page or not (so that Create Child macros in the template can be executed)

boolean

false

flag

Flag

A list of flags, one of which must be defined for the content to be displayed

string


notflag

Not Flag

A list of flags that must not be defined for the content to be displayed

string


Example

Create a child page called Child.

<ac:macro ac:name="create-child"> <ac:parameter ac:name="pagetitle">Child</ac:parameter> </ac:macro> {create-child:pagetitle=Child}

Result

On this page