Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Show Parent Document Name at top of Tree Menu Web Part View modes: 
User avatar
Member
Member
jpearce-amerisourcefunding - 2/18/2010 12:23:06 PM
   
Show Parent Document Name at top of Tree Menu Web Part
I am trying to figure out how I can show the name of the parent document at the top of the vertical Tree Menu Web Part.

Would I need to use a macro for this or how would I go about doing it?

For example:

I want to show the following bit of code at the top of my vertical navigation:

<div class="sideTitle">Parent Document Name Here</div>
Then the cms vertical tree menu would show below it.

Thanks in advance;
Jason

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 2/19/2010 4:55:29 AM
   
RE:Show Parent Document Name at top of Tree Menu Web Part
Hello,

You can get the parent Id of the current node with the method
CMS.SettingsProvide.ObjectTypeTreeNode.ParentNode(). Now you have just to get the NodeName of the node with the retrieved Id with the method CMS.CMSHelper.TreeHelper.SelectNodes(...). You can place your code into a custom transformation function. For more information about this topic and the mentioned methods please see the attached links.

API reference
Custom functions in transformations

Best regards,
Boris Pocatko