Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Treenodes, sub navigation View modes: 
User avatar
Member
Member
eoin-fusio - 10/14/2013 4:21:33 AM
   
Treenodes, sub navigation
I'm working with the TreeEngine to produce a navigation system, currently this works with one level of nav but I'd like it to show a further deeper level of nav as well.

So for example I have 3 pages, Page1,Page2,Page3. At the moment if I go to Page1 (has no sub pages) then I see Page1 highlighted. If I then click on Page2 (Page2 has a few sub pages) I see all of Page2's subpages but I no longer see Page1,Page2,Page3 in the nav, I only see the sub pages of Page2.

Here's the relevant section of code for the population of the tree nav. As this is someone else's code I'm not sure if it's the best solution, should I use a different form of navigation rather than the TreeEngine?
CMS.TreeEngine.TreeNode navRoot = CMSContext.CurrentDocument;

while (navRoot.NodeLevel > 2)
{
navRoot = TreeHelper.SelectSingleNode(navRoot.NodeParentID);
}

strStartPoint = navRoot.NodeAliasPath;

DataSet ds = TreeHelper.SelectNodes(strStarting + "/%", true, "", strWhereClause, "NodeOrder", 1, false);

//Loop through dataset and output UL LI etc.

User avatar
Member
Member
eoin-fusio - 10/14/2013 9:53:57 AM
   
RE:Treenodes, sub navigation
Ignore this, found out that the issue was related to the code hard coded to show only published documents, obviously during dev I only want to see unpublished. Changed the code and it's sorted now.