Hi all,
I would like to be able to change the title of the current page by scripting.
How can I do that ?
Atlassian Confluence 7.9.3
Power Scripts 1.1.14
Hi,
basically it's very simple. The question is, how experienced you are with scripting.
The code to change the title of current page is:
title = "This is a new title";
This can be used in combination with a listener.
If you want to refer to a particular page from within the script, then you need to add some more code like this:
string spaceKey = "DEMO"; //the key of your space
string pageTitle = "This is the old title"; //the title of the page you want to change
number page = getPage(spaceKey, pageTitle); //the page will be accessed by getting its unique id
%page%.title = "This is a new title"; //title of the accessed page will be changed
Cheers
Tobias
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.