Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax of profile picture macro

Christian Christian November 22, 2011

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

6 votes
Answer accepted
David at David Simpson Apps
Atlassian Partner
November 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

 

Christian Christian November 23, 2011

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 at David Simpson Apps
Atlassian Partner
November 23, 2011

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

Christian Christian November 27, 2011

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 at David Simpson Apps
Atlassian Partner
November 28, 2011

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

Christian Christian November 29, 2011

Works perfect - thanks a lot!

0 votes
Volker Bliscz
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!
August 27, 2012

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
TAGS
AUG Leaders

Atlassian Community Events