So from the communty posts i could put together a macro which counts the number of children under any given page (https://community.atlassian.com/t5/Confluence-questions/Macro-to-count-child-pages-of-specified-page/qaq-p/157546#link_1_9878d803e9bd1b):
#set($pageManager=$containerContext.getComponent('pageManager'))
#set($currentPage=$pageManager.getPage($space.key, $content.title))
#set($children=$currentPage.getChildren())
#set($count=$children.size())
$count
Is there a function that will allow me to return the number of internal links within a page?
eg:
#set($pageManager=$containerContext.getComponent('pageManager'))
#set($currentPage=$pageManager.getPage($space.key, $content.title))
#set($linksCount=$currentPage.getLinksCount())
$linksCount
It would be expected the output here to be a number representing the hyperlinks on the current page, ideally with the option to restrict the count to either "internal" or "external"
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.