{link-page}
Plugin: Linking Plugin
This will create a link to a page, or a link to create a page based on a template and/or parent page.
Description
If the page doesn't exist or is untitled, it generates a 'Add Page' link which, when clicked, can take the user directly to a template and/or set the page parent.
The title may also contain substitution markers, indicated with '%' surrounding a Supplier key chain value. Eg:
{link-page:name=%content:title% - %global:current user > user:full name%}your page{link-page}
This will link to a page with the name being the parent page's title, followed by " - " followed by the current user's name.
Usage
{link-page:[Page Name]|template=[template name]|parent=[@self,@parent,@home,Page Name]}[link text]{link-page}
Parameters
| Name | Required | Default | Description |
|---|---|---|---|
| [default]/name | | The name of the specific page to link to. If not provided, the link will always create a new page when clicked. | |
| template | | The name of the template to use when creating the page. | |
| live | | false
| if set to 'true', the template will be live when the page is created. Requires the Scaffolding Plugin to be installed. |
| parent | | @self
| The name of the parent page. If no parent page is desired, set parent to a blank value. ie. 'parent='. May also have the following markers:
|
| labels | | The list of labels to apply to the new page. Only works for live templates. | |
| 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
Template Page Link
Clicking this link will create a page called 'My Page' using the 'My Template' template with the 'Home' page set as the parent:
{link-page:My Page|template=My Template|parent=Home}Click here{link-page}.
Discussions