jkh80
-
6/5/2009 12:13:53 PM
RE:Why would a TreeNode have a NodeParentID referencing a document that doesn't exist?
Hi Juraj,
I found the problem I was having. I was calling CMS.CMSHelper.TreeHelper.SelectSingleDocument() where I meant to call CMS.CMSHelper.TreeHelper.SelectSingleNode() in my class, mixing up the document ID and the node ID.
However, I am now having another problem. I am using the CMS.TreeEngine.TreeProvider.SelectNodes() method to get the children of a node, but for a few parent nodes that have children, no data is being returned. All the nodes in question are of type CMS.MenuItem.
I am using Kentico version 4.0, build 4.0.3436, and I have applied hotfix 4.0.5 to my site.
Here is the call I am making, is there any reason that the child nodes of "Parent" would not be returned here?
CMS.TreeEngine.TreeProvider treeProvider = new CMS.TreeEngine.TreeProvider(); treeProvider.MergeResults = true; DataSet ds = treeProvider.SelectNodes( "MySite", string.Format("/Parent/%"), "en-US", false, "CMS.MenuItem", null, "NodeOrder", 1);
|