Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Linked document > create link to original View modes: 
User avatar
Certified Developer 8
Certified Developer 8
jao - 2/20/2013 5:09:11 AM
   
Linked document > create link to original
In a transformation that lists linked documents, is it possible to link to the original document? <%# GetDocumentLink() %> creates a link to the linked document, but I'd like the visitor to go to the original document.

User avatar
Kentico Support
Kentico Support
kentico_janh - 2/20/2013 7:50:08 AM
   
RE:Linked document > create link to original
Hello,

Yes you can do that, but not using the GetDocumentLink. You would need to create your own function which would be called with the NodeLinkedNodeID parameter and which would return appropriate link instead or you can code it directly to the transformation like this:

<a href='~<%# CMS.DocumentEngine.DocumentHelper.GetDocument(CMS.GlobalHelper.ValidationHelper.GetInteger(Eval("NodeLinkedNodeID"), 0), "en-us", new CMS.DocumentEngine.TreeProvider(CMS.CMSHelper.CMSContext.CurrentUser)).NodeAliasPath %>.aspx'>link to the original location of linked document</a>


Best regards,
Jan Hermann