Hi,
you could create a custom macro for this purpose. The code parse alias path of current node to find alias path of its parent. Then it finds information about the top level node.
case "myparentnode":
match = true;
result = "";
// Tree node
string parentPath = "/" + CMSContext.CurrentAliasPath.Split('/')[0];
if (!String.IsNullOrEmpty(parentPath))
{
CMS.TreeEngine.TreeNode node = null;
// Tree provider
UserInfo ui = UserInfoProvider.GetUserInfo("administrator");
CMS.TreeEngine.TreeProvider tree = new CMS.TreeEngine.TreeProvider(ui);
// Get Single node specified by it`s ID
node = tree.SelectSingleNode(CMSContext.CurrentSiteName, parentPath, "en-us");
if (node != null)
{
result = node.NodeName;
}
}
break;
Best regards,
Ivana Tomanickova