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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

989 views 23 13
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