How to automatically assign a number to a page?

I am building a knowledgebase and each article has its own distinct number. The format is K-0000. There is a requirement from our stakeholders that this number be automatically assigned so our authors don't accidentally assign the same number to multiple kb articles. This number appears in the title and in a table at the top of the article.

Any idea how to accomplish this in Confluence 4.0?

Thank you!

1 answer

Why don't you want to use PageID for that?

In admin area go to Edit Site Layouts » Page Layout and change page layout in a way that it will show somewhere "K-<Page ID>" page id I guess can be obtain through a helper variable (not sure), need to read some documentation.

We already have 850 articles and people know and refer to them by their number. I don't want to change them now, and I don't want to change the numbering convention...or have gaps in the number if the page ids were used for other spaces.

Ok, I see... Thus you might probably want to develop your custom plugin and got the autonumber for pages from a kinda global variable (thread safe, singleton, etc)...

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

253 views 11 10
Join discussion

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