Add Page via Form

Description

Creates a simple form on a page for users to enter the name of the new page to add.

Very similar to the Add Page macro, this will then create a new page, which may be based on a template if so desired.


Parameters

NameRequiredAvailable InDefault ValueDescription

Link Text

 (tick)

Server & Cloud


Text display for the link.

Source

 (error)

Server


The name of the template to use or page to clone.

Source Type

 (error)

Server

template

The type of source to use, either template or page.

Live Template

 (error)

Server

false

If set to true, the template will be "live" - that it it uses Scaffolding's Live Template macro to import and execute the current value of the template every time the page is viewed.

Requires Scaffolding to be installed. 

Prefix

 (error)

Server & Cloud


Server

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. 

For example:

"%page:title% - " will add the current page title plus " - " to the start of the page name. 

(warning) Injections are not supported on Cloud.

Cloud

The prefix to apply before the page name. May contain these functions:

  • $date(<date-format>) to output the current time and date e.g. $date(YYYY-MM-dd HH:mm a). Supported date-formats are as follows:

    FormatOutputDescription
    YY18Two-digit year
    YYYY2018Four-digit year
    M1-12The month, beginning at 1
    MM01-12The month, 2-digits
    MMMJan-DecThe abbreviated month name
    MMMMJanuary-DecemberThe full month name
    D1-31The day of the month
    DD01-31The day of the month, 2-digits
    d0-6The day of the week, with Sunday as 0
    ddSu-SaThe min name of the day of the week
    dddSun-SatThe short name of the day of the week
    ddddSunday-SaturdayThe name of the day of the week
    H0-23The hour
    HH00-23The hour, 2-digits
    h1-12The hour, 12-hour clock
    hh01-12The hour, 12-hour clock, 2-digits
    m0-59The minute
    mm00-59The minute, 2-digits
    s0-59The second
    ss00-59The second, 2-digits
    SSS000-999The millisecond, 3-digits
    Z+5:00The offset from UTC
    ZZ+0500The offset from UTC, 2-digits
    AAM PM
    aam pm
  • $id(<format>,<startAt>) to assign incremental IDs e.g. $id(000,1)

Postfix

 (error)

Server & Cloud


Server

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. 

For example:

"%page:title% - " will add the current page title plus " - " to the end of the page name. 

(warning) Injections are not supported on Cloud.

Cloud

The postfix to apply before the page name. May contain these functions:

  • $date(<date-format>) to output the current time and date e.g. $date(YYYY-MM-dd HH:mm a). Supported date-formats are as follows:

    FormatOutputDescription
    YY18Two-digit year
    YYYY2018Four-digit year
    M1-12The month, beginning at 1
    MM01-12The month, 2-digits
    MMMJan-DecThe abbreviated month name
    MMMMJanuary-DecemberThe full month name
    D1-31The day of the month
    DD01-31The day of the month, 2-digits
    d0-6The day of the week, with Sunday as 0
    ddSu-SaThe min name of the day of the week
    dddSun-SatThe short name of the day of the week
    ddddSunday-SaturdayThe name of the day of the week
    H0-23The hour
    HH00-23The hour, 2-digits
    h1-12The hour, 12-hour clock
    hh01-12The hour, 12-hour clock, 2-digits
    m0-59The minute
    mm00-59The minute, 2-digits
    s0-59The second
    ss00-59The second, 2-digits
    SSS000-999The millisecond, 3-digits
    Z+5:00The offset from UTC
    ZZ+0500The offset from UTC, 2-digits
    AAM PM
    aam pm
  • $id(<format>,<startAt>) to assign incremental IDs e.g. $id(000,1)

Parent

 (error)

Server & Cloud

@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.

e.g. "parent=". There are also three special values:

  • @self - sets the parent to the new page the macro appears in.
  • @parent - sets the parent of the new page to the parent of the current page.
  • @home - sets the parent of the new page to the home page of the current space. 

Labels

 (error)

Cloud


The list of labels to attach to the new page.

Allow Rename

 (error)

Server


If set to true, the user will be allowed to rename the page when it is being created. 

Name Field Width

 (error)

Server


If set, this specifies the width of the name text field.

Can be any valid CSS width value, such as "300px" or "60%".

CSS Class

 (error)

Server


Sets a class for the displayed form items.