Code always return zero with anonymous access

Debayo Graham asked on August 18, 2014 21:06

Good Day All,

The following always return zero when I am not logged on CMS.DocumentEngine.TreeNode tn = TreeHelper.SelectSingleNode(oid); lblInfo.Text = tn.Parent.Children.Count.ToString();

When logged in to admin I get 6 which is the correct amount for the Parent. What I am trying to achieve is the nodealiaspath for the previous and next document in the tree if the exist

Correct Answer

Martin Danko answered on August 19, 2014 16:31

Hello Debayo,

Please take a look at the following article which should help you to fix this issue: API Changes in the Security of Document collection

Best regards, Martin

0 votesVote for this answer Unmark Correct answer

Recent Answers


Debayo Graham answered on August 19, 2014 15:45

Any suggestions?

0 votesVote for this answer Mark as a Correct answer

Debayo Graham answered on August 21, 2014 20:55

Thanks alot worked like a charm

0 votesVote for this answer Mark as a Correct answer

Martin Danko answered on August 22, 2014 23:49

Hi Debayou,

Great, I'm glad to hear that! You're welcome.

Best regards, Martin

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.