Syntax of profile picture macro

Hi guys!

Since Confluence 4 it is not possible anymore to see the syntax of a macro. As we are using refinedwiki theme with a customized layout, I want to show the profile picture of the current logged in user on the dashboard. But to be able to solve this I would need to know the syntax of this macro, like {profile-picture|user=@self}

thanks,
Christian

2 answers

1 accepted

3 votes
David Simpson Community Champion Nov 22, 2011

Browse to Tools | View Storage Format and you'll get something like

<ac:macro ac:name="profile-picture"><ac:parameter ac:name="User">david</ac:parameter></ac:macro>

Wrap this is a user macro and you get...

## Macro title: My Profile Picture
## Macro has a body: N
## Body processing: None
## Output: HTML
##
## Developed by: David Simpson
## Date created: dd/mm/yyyy
## Installed by: My Name

## Display a picture of the currently logged in user
#if($action.remoteUser)
<ac:macro ac:name="profile-picture"><ac:parameter ac:name="User">$action.remoteUser.name</ac:parameter></ac:macro>
#end


Hi David!

Thanks a lot - finally I got it. And finally I got the answer how to use macros wherever there is no macro editor available!

T H A N K Y O U ! ! !

David Simpson Community Champion Nov 23, 2011

@Christian Neureiter: If the answer was good enough, upvote it and/or mark it as correct :)

One more question to this. The macro is working fine and does exactly what it should. The only problem is that on the landing page it shows " $action.remoteUser.fullName" if the user has not logged in yet. How can this be hidden from users which are not logged in yet? As far as I know the hide-from and show-to macro is not yet compatible with confluence v4.

David Simpson Community Champion Nov 28, 2011

@Christian Neureiter: Check the update. Hopefully it will fix your problem.

Works perfect - thanks a lot!

Hi Christian, hi David,

is it possible to use this macro with wiki markup, too? For instance defining template pages or where else wiki markup is still used.

ciao

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 Apr 13, 2018 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...

2,933 views 27 12
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