{add-page}
Plugin: Linking Plugin
This will create a link on your page which, when clicked, is equivalent to clicking 'Add Page' on the Page Operations bar.
Usage
{add-page:template=[template name]|live=true|parent=[@self,@parent,@home,Page Name]}[link text]{add-page}
Parameters
| Name | Required | Default | Description |
|---|---|---|---|
| template | | The name of the Template to use when creating the page. | |
| live | | false
| If set to 'true', the template will be 'live' - that is it uses the live-template macro to import and execute the current value of the template every time the page is viewed. Requires the Scaffolding Plugin to be installed. |
| parent | | @self
| The page you would like to be the parent of the new page. If no parent page is desired, set parent to a blank value. ie. 'parent='. There are also three special values:
|
| labels | | The list of labels to attach to the new page. Only works for live template pages. | |
| title | | If you want popup text to appear when the mouse is hovered over the link, enter it here. | |
| allowRename | | false
| (Since 2.4) If set to true, the user will be allowed to rename the page when it is being created. |
| prefix | | (Since 2.8.0) The %injectable% prefix to apply to the page name. The user will not be able to modify this section of the name while creating it. Eg: 'prefix=%page:title% - ' will add the current page title plus ' - ' to the start of the page name. | |
| postfix | | (Since 2.8.0) The %injectable% postfix to apply to the page name. The user will not be able to modify this section of the name while creating it. Eg: 'postfix= - %page:title%' will add the current page title plus ' - ' to the end of the page name. |
Examples
Standard template
I have a template which lets me fill in Project details. I want it to be used each time someone creates a new project
and listed automatically on the current page ('Projects').
h1. Projects
{children}
{add-page:template=Project Details|parent=@self}Add a Project{add-page}
Live Template + Prefix
This uses a live template and adds a required prefix. The user will fill in the rest of the page name on the next screen.
{add-page:template=Project Details|live=true|prefix=%page:title% - }Add a project{add-page}
Discussions