Display a page's current version

Hi

I'm using Confluence 5.7.4.

I was just asked how to display the current page version in the page without having to go to the page history menu. Is it possible to do? Do I need to use a user macro to do this? If it is only possible using macros, would the syntax be something like $content.version?

Thanks!

1 answer

1 accepted

2 votes
Stephen Deutsch Community Champion May 11, 2016

Hi Richard,

A user macro should be the only easy way to do this, and your syntax seems to be right... why not test it? It should return exactly the version number of the page (i.e. "11" for v. 11).

Just make sure to include 

## @noparams

at the top of your user macro.

Great, thanks @Stephen Deutsch. Tried it out and it's as simple as:

## @noparams
$content.version

And now appears in my Macro browser (once I deleted all the comments - it doesn't seem to like it if you leave additional comments so my macro is literally just those two lines of code)

Didn't realise the macros would be so easy actually, that's why I was wary of trying it out smile

Many thanks for your help!

Stephen Deutsch Community Champion May 11, 2016

No problem, glad I could help!

We have the Cloud version of Confluence, and I would like to show the current version # on a PDF export.  Is this possible?   

Hi @Michelle Oliveri

Using Scroll PDF Exporter for Cloud you can simply define a placeholder in your template to display the revision number of the page you're exporting.

You can find further information about all the available placeholders in our documentation: for your case the "Page Revision" placeholder is the one to look at.

Hope this helps.

Best,
Nils

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
Published yesterday in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

108 views 2 4
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