Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Write a user macro to show outgoing links

Manfred Mütze June 25, 2020

Hi,

I like to write a user macro to show a list of outgoing links from the current page.

I try something like this:

#foreach ($olink in $action.getOutgoingLinks())
    $olink.getLinkTitle()
#end

No result. Need some help.

Regards

Manfred

1 answer

1 vote
Dominic Lagger
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 25, 2020

Hi @Manfred Mütze 

The outgoingLinks() function is on the ContentEntityObject

Therefore you have to use: 

<ul>
#foreach ($olink in $content.getOutgoingLinks())
<li>$olink</li>
#end
</ul>

 Regards, Dominic

Manfred Mütze June 28, 2020

Hi Dominic,

thank you again.

It works perfect.

Regards

Manfred

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events