I have a web content structure (WCM) with a Field of type "Link to page" (ddm-link-to-page
). Then I created an asset publisher template (ADT) to display the link for pages of the web content.
<#assign journalArticle = assetRenderer.getArticle() />
<#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale.toString())) />
<#assign URLnode = document.selectSingleNode("/root/dynamic-element[@name='Link_To_Page']/dynamic-content") />
<#assign getURL = URLnode.getText() />
<a href="${getURL}">Go to page</a>
The problem is that the value displayed is a reference to the element and not the value of the link (it shows /348@public@9246542
) so
URLnode.getText()
is not working.
All other field works.
ps. I also tried with URLnode.getStringValue()