Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Displaying the Parent of an item in a transformation View modes: 
User avatar
Member
Member
Chanan - 2/4/2011 12:57:14 PM
   
Displaying the Parent of an item in a transformation
Hello,

Is there a way to display the parent document name (and get the url of)?

I have a structure like this:

Article
Reference (datatype that can be added on to an article)

Elsewhere in the site we want to show a list of all References with the name of the article they come from and link to that article. How can we get to that data via the transform methods?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/7/2011 1:52:26 AM
   
RE:Displaying the Parent of an item in a transformation
Hi,

You need to create a custom transformation function to which you will pass the actual item (node).
In the code of the custom function you will get the NodeParentID value of current node which is equal to its parent NodeID - once you have this ID, you can get its alias path and compose the URL and display the links.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Chanan - 2/7/2011 8:19:18 AM
   
RE:Displaying the Parent of an item in a transformation
Ah ok, that makes sense. Thanks for your help.