How can I put the date of creation, latest update date and name of the user that created/updated the page as visible text on the page?

How can I put the date of creation, latest update date and name of the user that created/updated the page as visible text on the page?

Something like this:

Created by: xxxx

Created at : YYYYMMDD

Last Modfied by: NNN

Last Modified at: YYYYMMDD hh:mm

4 answers

1 accepted

I had hoped, there was need to do "programming", just to place some "known" meta-data in a document.

-

We are using AdHoc workflows which has a macro called metadat from that I have used, but I have problems fining out what metadat is available to report om.

A list of meta-data and how to reference the metadat would be nice.

You will most likely want to do this as a User Macro like this:

## Macro title: Page Data
## Macro has a body: N
## Body processing: n/a
## Output: HTML
##
## Developed by: Matthew J. Horn
## Date created: 11/19/2013
## @noparams

Created: $action.dateFormatter.formatGivenString("dd-MMM-yyyy", $content.getCreationDate())<br/>
Created by: $content.getCreatorName()<br/>
Last modified: $action.dateFormatter.formatGivenString("dd-MMM-yyyy", $content.getLastModificationDate())<br/>
Last modified by: $content.getLastModifierName()<br/>

Hi, thanks for your answer. Is there a way for me as a normal user/not administrator to include this directly into the document, rather than ask an admin to create a user macro?

-

Also where can I find documentation on the syntax of the language you have used and list of available variables I can reference in the macro's

There are some built in macros such as Contributors and Contributors Summary that show some of the info you want. If you have access to the Page Layout decorator, there are other ways to do this without writing a User Macro. Let me know and I can give you an example.

As far as documentation on the user macro language, it's pretty sparse, but you can start here:

https://confluence.atlassian.com/display/DOC/Writing+User+Macros

hth,

matt

I had hoped, there was need to do "programming", just to place some "known" meta-data in a document.

-

We are using AdHoc workflows which has a macro called metadat from that I have used, but I have problems fining out what metadat is available to report om.

A list of meta-data and how to reference the metadat would be nice.

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...

299 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