I created the special template for Use Case creation in Confluence. And I'd like to link pages between themselves. Is there some way to link pages like Jira (or other bug-trackers)? When I insert the link on the 1st page, reverse link is created too on the second page. I'd like to create a custom field fot this in my template
You can do this pretty easy with a user macro. Here is what it would look like.
Macro name:
referring_content
Macro title:
Referring Content
Macro Body Processing:
No maco body
Template:
## Developed by: Davin Studer ## Date created: 06/26/2014 ## @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($linkManager=$containerContext.getComponent('linkManager')) #set($pages = $linkManager.getReferringContent($content)) #foreach($page in $pages) <a href="$page.getUrlPath()">$page.getTitle()</a><br/> #end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.