| The {scroll-pagetitle} macro depends on the Confluence Metadata Plugin as a prerequisite. |
In Confluence there are three restrictions to the page title.
- Page titles can't contain special characters such as :, @, /, \, |, ^, #, ;, [, ], {, }, <, >,
- Neither page titles can start with $, .., ~,
- Also, you can't use the same page title multiple times in the same space.
The {scroll-pagetitle} macro can be used to replace the Confluence page title during export. Therefore, surround the content which should be used as page title by the {scroll-pagetitle} macro.
{scroll-pagetitle}This is my new page title :-){scroll-pagetitle}
Here comes the content.
This will output This is my new page title :-) as the heading for the page on which this macro is added.
Installing the User Macro
Confluence 3.4 and up
To install the user macro to overwrite the page title,
- Go to the Confluence Administration Console and click 'User Macros' in the left-hand panel.
- Click the link on the text 'Click here to create a new User Macro' at the top of the list of macros.
- Enter the macro attributes as follows:
- Macro Name: scroll-pagetitle
- Visibility: Visible to all users in the Macro Browser
- Macro Title: Scroll Pagetitle
- Description: Makes Scroll overwrite the page title on export.
- Categories – Confluence Content
- Icon URL: leave empty (unfortunately, there is no easy way to reference an icon provided by a plugin, see this comment)
- Documentation URL: http://k15t.com/display/OFCE/Overwriting+Confluence+Page+Title
- Macro Body Processing: Convert wiki markup to HTML
- Output Format: Wiki Markup
- Template:
## @noparams {metadata:scroll.pagetitle|hidden=true}$body {metadata}
Confluence 3.3 and earlier
To install the user macro to overwrite the page title,
- Go to the Confluence Administration Console and click 'User Macros' in the left-hand panel.
- Click the link on the text 'Create a User Macro' at the top of the list of macros.
- Enter the macro attributes as follows:
- Macro Name: scroll-pagetitle
- Macro Body: select 'Macro has a body' and 'Use unprocessed macro body'
- Output: select 'Macro generates wiki markup'
- Template:
## @noparams {metadata:scroll.pagetitle|hidden=true}$body {metadata}
Labels:
None
