Display the page version

René Steg July 24, 2012

I would like to diplay the page version in a Confluence page. I know I can include the change history via macro, but that results over time in a very long list. And I am actually interested in the version and maybe the author of the change only. I don't really need the entire change log.

3 answers

1 accepted

1 vote
Answer accepted
Amalia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2012

If you want to display the change version (and the author) in all pages of Confluence, you can do that by modifying the layout (Confluence Admin > Layouts). Click "Create Custom" for Page Layout. Depending on where you want to put this information in the page, you can add

$confPage.version

to display the page version, and

$confPage.lastModifierName

to display the author

Just ensure that you use these variables after the line:

#set ($confPage = $helper.page)
René Steg July 26, 2012

Thanks, that seems exactly what I am looking for. However, Confluence asks me to deactivate the design first and I can't see where I have to do that in the administration.

Amalia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2012

You can do it in Confluence Admin and click "Layouts". Can you find it?

René Steg July 26, 2012

Yes I found layouts, but then the following message appears :

Sie können die Site-Gestaltung nicht anpassen, während ein Design aktiv ist. Sie müssen zuerst das derzeit konfigurierte Design deaktivieren.


Amalia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 27, 2012

This seems to apply only for the Default Theme. Are you using Documentation Theme as the default Confluence theme? Then you have to edit the Velocity template file in the jar file instead. Go to <confluence-install>/confluence/WEB-INF/classes/com/atlassian/confluence/setup and open atlassian-bundled-plugins.zip. Locate and open doctheme-x.x.x.jar file. The template file for the page is in page.vmd which resides in doctheme/decorators folder.

0 votes
jako mercurio August 27, 2013

is there a macro that can be added for a specific page?

for example content.pageversion?

0 votes
Alejandro Conde Carrillo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 24, 2012

Which Version of Conlfuence are you using? Are yo uusing any customization?

Confluence by default shows this text under the tittle of the page:

Added by User Name, last edited by User Name on Jul 24, 2012 (view change)


Isn't that information enough? You get the user name and the date of the last change (much more meaningful than a versioin number).

René Steg August 6, 2012

We are using Confluence 4.2. And no, that information is not enough, as it is not included in PDFs and the very same page could be edited within a day more than once. As we also provide certain documentation to our customers, such as requirement spec, those pages need version numbers and the author of that last change.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events