Install this User Macro in Confluence. (You must be Confluence admin of course)
## @noparams
#set($containerManagerClass=$content.class.forName('com.atlassian.spring.container.ContainerManager'))
#set($getInstanceMethod=$containerManagerClass.getDeclaredMethod('getInstance',null))
#set($containerManager=$getInstanceMethod.invoke(null,null))
#set($containerContext=$containerManager.containerContext)
#set($likeManager=$containerContext.getComponent('likeManager'))
$likeManager.removeAllLikesOn($content)
#foreach ($child in $content.children)
$likeManager.removeAllLikesOn($child)
#end
Once installed, insert the Macro in the page to reset its likes and the likes of the children pages. Just click “Preview” or “Publish” to reset.
IMPORTANT: Remember to remove the Macro from the page to turn on the like counters!!
Very useful for Hackathons!
By MrAddon





