create Template that creates unique Page ID



Is there a way to create a Page with a unique Page title e.g. "Project: " & 10001? For every new page this number will increment.

I am currently a Space Administrator for a single space that i have created. But I am unable to create User macros. There does not seem to be any option. I can only add the built-in HTML macro.

Can anyone help quickly?

2 answers

0 votes

Natively, no, the page title is just a string, given by the user, there's no way to inject something in there even with a template.

You could use some code that could re-write the page title as it is saved, I think, but you'll need an add-on to do it, but you might find it struggles with the uniqueness and incrementing if pages are saved at similar times.

I'd be tempted to just use the page ID - that's immutable, numeric and increments as you create new pages, and can be used to jump straight to a page in a url.

Can you elaborate with an example on how to use a pageID from within a template? Right now i can only use the HTML macro which is enabled. JQuery / Javascript works in it fine.

OR is pageID a parameter that can be used in the Create From Template macro?

I've never done it in a template.  Never had any need for it.  The one time I was asked for something like this, the actual problem the users were trying to solve with numbering was easily and better solved by using Confluence functionality that they were unaware of.

I know the page id is available to pages, as I've written user macros (to help with debugging) that can display the id of the current page.  However, I don't think it's available in a template or page create, because the ID is not allocated until the page is created.

Hi Eijaz,

You could use the App Page Tree Creator. It supports consecutive numbers per space. But you need an administrator to install the App.

Stephan (I am the CEO of EPS, the vendor of the Page Tree Creator)

Hi Stephan,

Does it put a unique page number automatically in the Title when a Page is created? Currently i donot see it, except for Page Tree macro.

Say, If i place a 'Create Page' button on a Main page and click it to create Child pages, will the pages be titled with unique numbers? Where do i need to insert the Page Tree creator macro?

Hi Eijaz,

About the unique page number:

  1. Define a consecutive tag under Space Tools -> Add-ons -> Consecutive Tags; e.g. __Page_UID__. The tag has to be defined in the target space.
  2. Use this consecutive tag in the PTC Template page title; e.g. __Page_UID__ __Page-Title__. This Template can be in the PTC Template Space.
  3. Place a PTC Button macro at the main page (target space) and use the PTC Template as Source Page.

We could also schedule a screen sharing meeting. We could explain everything in detail about how it works.


HI Stephan,

I have similar requirements can you please guide with the same .

Can we have a meeting .

Best Regards


Hi Avin,

Yes, of course. Can you send me an email with a suggestion for an appointment (

You can test the functionality under the following link:
In addition to the sequential number, months are also entered here. Of course, it is also possible to configure only the number.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

272 views 2 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you