How to let users enter the page title

How to let users enter the page title

This article will show you how to enable your users to enter a custom page title for a Confluence page.

Prerequisite

You have an operation with a manual trigger that creates or updates a Confluence page.

Add the User Input

From the Manage Operations page, select Add User Input and enter the following information:

Type

Text (single line)

Name

Page Title

Name Translation

de_DE: Seitentitel

Default Value

$stringUtils.left($!{issue.summary}, 230) ($!{issue.key})

Variable Name

pageTitle

The Name Translation input is optional.

We are using the default value input here to prefill the user input. That way your users don't have to enter a title, but can instead leave the suggested title.

Use the User Input

From the Manage Templates page, edit the template that is used by your operation. If you are using one of the default templates, you have to copy that template, but don't forget to update your operation later to use the newly created template.

Enter $userInput.pageTitle for the page title. If you want to be able to use your template in other places, where the user input is not available, you can use the following:

Page Title

#if($userInput.pageTitle) $userInput.pageTitle #else $stringUtils.left($!{issue.summary}, 230) ($!{issue.key}) #end

If the user input is a not available, the issue summary and key are used as the page title.

Result

When a user selects the operation in the Publish Issue dialog, the user can enter a different page title.