I'd like to create a user macro that contains the same information as the author tagline:
Created by Jane Doe, last modified by John Doe on August 20, 2014.
I created a user macro that only displays when a page was last modified. But some of our pages need to display the author.
This is what's included in my last modified macro.
## contains last modified date only. Created date doesn't display.
## @param lastmodified:title=Last Modified
Last modifed on $action.dateFormatter.formatDateFull($content.getLastModificationDate())
I don't know how to add the author names. Can you please help?
Thanks,
Rosemary
Community moderators have prevented the ability to post new answers.
$content.getCreator().getFullName() $content.getLastModifier().getFullName()
https://docs.atlassian.com/atlassian-confluence/5.4.2/com/atlassian/confluence/pages/Page.html
Sorry for the delay in responding to this. Your solution works perfectly. Much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @TtheB
How to show the created date for the page?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
$content.getCreationDate()
and formatted output:
$action.dateFormatter.formatDateFull($content.getCreationDate())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @TtheB
Thanks for the response.
Actually, im looking to show the Created Date for the page along with Created by, last modified.
I added the above code but no luck, could you please let me know where i have been done the wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This topic refers to user macros: https://confluence.atlassian.com/doc/writing-user-macros-4485.html the code will not work in the space stylesheet section or anywhere else in the space administration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @TtheB
Its working fine with User Macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.