Description

  • The Create Page macro helps users to create pages in the right place, with the right template and correctly formatted page title.

Usage

  • Click Insert > Other Macros.

macro browser
  • Select the Create Page macro from the provided list.

create page macro list
  • Complete the desired fields.

Parameter Description Type Default Required

Parent

By default, the created page will use the current page as its parent. However, you can specify a different parent page by supplying the page title. This field also accepts the variables: $self, $parent, $username, $fullname, $year, $month and $day.

string

$self

no

Title

Specifies the title of the new page. This field also accepts the following variables: $parenttitle, $ident, $username, $fullname, $year, $month and $day.

string

none

no

From Page

Specifies an existing page from which the new page will copy content

string

none

no

Labels

Add labels to the newly created page. Accepts several labels in a comma separated list. The following variables can be used: $parenttitle, $pagetitle, $username, $fullname, $year, $month and $day.

string

none

no

Title Prefix

Prefix to be applied to the page title given by the user.

string

none

no

Title Suffix

Suffix to be applied to the name given by the user.

string

none

no

Target Mode

Options are 'view' or 'edit'. Whether to go to view or edit mode when creating the page.

enum

view mode

yes

Template

The name of the template that will be used when creating the new page.

string

none

no

CSS Class

Optional CSS Class to help with styling.

string

none

no

Ident Index

Allow the $ident parameter to start from a specific number.

int

none

no

Add Space

Add a space in between prefix and postfix variables.

boolean

true

no

Prompt Title

Customise the title used in the prompt dialog. If left empty then the title will be Please enter the new page title

string

none

no

Suppress Notification

Suppress notification while creating page.

boolean

false

no

Variable descriptions

Variable Description

$parenttitle

the title of the parent page.

$ident

a number which increments each time a new page is created if the title exists.

$increment

a number which increments each time a new page is created.

$username

the username of the user that created the page.

$fullname

the full name of the user that created the page.

$year

the current year.

$month

the current month.

$day

the current day.

$self

the current page.

Note

Labels must obey naming restrictions imposed by Atlassian. The following characters will be removed (:, ;, ,, ., , ?, &, [, ], (, ), #, ^, *, @, !, ' ' spaces ).

  • Supply the text that is going to be used to display the Create page link.

createPageMacroEdit
  • Save the Confluence page

createPageMacroView

For how-to questions please ask on Atlassian Answers where there is a very active community. Adaptavist staff are also likely to respond there.

Ask a question about ScriptRunner for JIRA, for for Bitbucket Server, or for Confluence.