Hello,
Can anyone help with custom macro to display number of likes (or comments) on a page?
I'm trying to populate "page properties report" but build in likes/comments count functionality has a bug and column headers don't display likes/comments.
So i'm building out template for "page properties" macro to capture the data and than pull it on higher up report page.
Thanks in Advance!
I only get the answer for the comments:
#set( $page = $pageManager.getPage($content.getId()) )
Comments: $page.getComments().size()
For the likes, I do not know how to get it. Sorry.
Regards, Dominic
Hi @Dominic Lagger ,
Thanks for the answer, i think i know the variable for likes.
One question is it all i need to include in Custom Macro?
Best,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My full "No macro body" looks like this:
## Macro title: My Macro
## Macro has a body: Y or N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: My Name
## Date created: dd/mm/yyyy
## Installed by: My Name
## @noparams
#set( $page = $pageManager.getPage($content.getId()) )
Comments: $page.getComments().size()
Please share your code for the likes. I'm interessted into this.
Regards, Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the full code, comment count works, but we are still researching one for likes.
We tried likesManager.getlikes() but it didnt work.
We will be working with Atlassian to find the solution and post it here once found!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.