Creator — Confluence Cloud Macro
This macro displays a mention of the user who created the current Confluence page. If the current user is the page's creator, the mention is styled in blue; otherwise, it is styled in gray. The macro uses the $StringUtils.equals() method to check the user ID.
Template
## Check if current user is the author
#set ($isCurrentUser = $StringUtils.equals( $user.accountId, $page.authorId ))
#if ( $isCurrentUser )
## Only current user styled with blue
#set( $blueStyle = "aui-lozenge-inprogress" )
#else
## Retrieve author details and rewrite user variable
#set ($user = $ConfluenceManager.get("/wiki/rest/api/user?accountId=$page.authorId" ))
#end
## Return the Mention
<a href="${baseUrl}/people/${user.accountId}">
<span class="aui-lozenge $blueStyle">
@$user.displayName
</span>
</a>You May Also Like
Shows page creation date
Macro for generating ID in base32 format
Get the latest cryptocurrency rates for major coins.
Create dropdown menus in Confluence Cloud with custom sets of options, multiselect features, and permission gates
Display page edit and view restrictions in Confluence to get essential permission details, including users, groups, and inherited access.
Convert a specified amount of cryptocurrency to fiat currency.
Macro that will show a "Delete me" message only for editors (in the Page Edit mode)
Display a custom list of recently updated content
Space Information macro by space Id
Perform text searches within pages, blog posts, and attachments.