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

0 votes
Accepted answer

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
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,088 views 17 14
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