User macro: Show profile of the page creator

GKD-IT
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 20, 2018

I'd like to embed the profile of the page creator, with the e-mail address and telephone number, by default to the "how-to article".

Therefore I would like to write a user macro, which I will place inside the blueprint of the"how-to article".

I found the following: 

$content.getCreatorName()

Source: https://community.atlassian.com/t5/Jira-questions/Access-a-page-creator-in-a-user-macro/qaq-p/90607

This gives me the name of the page creator, but no link to the user profile e.g.

Could someone help me? 

(Confluence Server, version 6.9.1)

 

1 answer

1 accepted

2 votes
Answer accepted
Zak Laughton
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2018

I was able to link to the page creator's profile by getting the creator's key and inserting it into the bundled "User Profile" macro. I hope this helps!

## Macro title: Creator Profile
## Macro has a body: N
## Body processing: No macro body
## @noparams

#set ($creatorKey = $content.getCreator().key)

<ac:structured-macro ac:name="profile" ac:schema-version="1">
<ac:parameter ac:name="user"><ri:user ri:userkey="$creatorKey" /></ac:parameter>
</ac:structured-macro>

(Side note: by default, the creator's profile will also be linked under the page title next to "Created by", but this macro will make a more prominent link/photo to the creator's profile.)

GKD-IT
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 23, 2018

Dear Zak

That is exactly what I needed! Thank you!

Works perfekt!

Marc Jason Mutuc June 14, 2019

Cool! Works!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events