Is it possible to auto generate number in confluence 5.7
Asked by Sabu Nair:

Hi,

We user confluence version 5.7 server .

I am trying to setup documentation system and have a requirement to generate automated number for each page. ( DOC001 ,DOC002 ...) . Is it possible in Confluence ?.


Answers:
author: Steffen Heller
body: You can use CSS counters to automatically number pages, headings or any other html element.


author: Sabu Nair
body: Thanks Milo and Steffen for the response. Can you please provide an example how to implement the solution.


author: andybandy89
body: We had a similar request for a solution in Confluence and solved it by using an Event Listener of the app Adaptavist Scriptrunner for Confluence. It fires each time a page updates and every page with a specific label automatically updates the page title with a prefix and incrementing number. The solution is described here:

<http://coffeetime.solutions/automatic-page-numbering-in-atlassian-confluence/>


author: EPS Software Engineering AG
body: Hi,

Our Page Tree Creator (PTC) supports [consecutive numbers](https://focuspro.eps.ch/display/PPTCDOC/Tags+and+Replacement+4.0). They can be built up by string, numbers, calculations (currentYear - 1971), etc.

Check out our **[LIVE EXAMPLES](https://focuspro.eps.ch/display/PEPSMarktExample/Marketplace+Examples)** (no registration needed).

Give it a try: **[Marketplace link Page Tree Creator](https://marketplace.atlassian.com/plugins/eps.focuspro.PageTreeCreator/server/overview)**.

Regards,  
Stephan


author: Manjunatha K R
body: You can use "Requirement Yogi for cofluence" add-on to generate the requirements keys automated within page or common across space also.


author: Sabu Nair
body: Thanks Milo and Steffen. Appreciate your answers. Both the solutions worked perfect for me.


author: Steffen Heller
body: If you want to add numbers to a html element (for example: h1) you can do this with:

```
body {  counter-reset: levelA;   }    h1:before {  content: counter(levelA) ". ";  counter-increment: levelA;  }
```

What I don't know yet:

* Do you want it for PDF or for html?
* Do you want to number (1) separate documents or (2) pages within a document? Milo's approach will only work for (1), mine will only work for (2)


author: Milo Test
body: In the Create Page Macro, enter the document name in the Title field.

image2015-8-4 15:3:22.png

This will create a new document thusly:

image2015-8-4 15:5:17.png

The %ident% auto-increments the number in the name.  
[](https://community.atlassian.com/t5/Confluence-questions/Is-it-possible-to-auto-generate-number-in-confluence-5-7/qaq-p/220814?attachment-id=11478){#link_11881e692a1bfd}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/37409/1/image2015-8-4%2015%3A3%3A22.png){#display_11881e692a1bfd_0}  
[](https://community.atlassian.com/t5/Confluence-questions/Is-it-possible-to-auto-generate-number-in-confluence-5-7/qaq-p/220814?attachment-id=11479){#link_11881e692a1bfd_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/37409/2/image2015-8-4%2015%3A5%3A17.png){#display_11881e692a1bfd_2}

comments: author: Rajesh Prabhakaran
body: Thank you . This was useful


author: Milo Test
body: You can use the Create Page macro to do this. It allows you to add bits to the created page's title.


Tags: confluence-administration