I have created following
## @noparams
#foreach ($link in $action.getIncomingLinks())
<a href="$link.getSourceContent().getUrlPath()">$link.getSourceContent().getTitle()</a>
<br>
#end
This code is placed on some website and it shows all incoming-links.
The problem is that this code shows all incoming-links
My Question:
Is there a way to filter incoming-links by labels ?
Maybe someone knows how to place incoming-links inside Content by Label’ Macro so labels can be applied ?
Thanks,
Rafal
Hello @Rafal Niznik !
Upon reading the AbstractLink Class document, I saw the getSourceContent method. It returns an object of the ContentEntityObject type. This type, in return, has the getLabels method inherited from com.atlassian.confluence.core.AbstractLabelableEntityObject.
You judging by this, you should be able to use the getLabels to work with the labels for that object.
However, seeing that Velocity has different contexts, I believe that this documentation may come in handy:
Here you can also check the extra objects that are available for user macros in Confluence Server:
I would also like to point out that our sister community, the Developer Community may be better equipped to deal with this kind of development for Confluence! You can take a look here:
Let us hear from you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.