How to get count of pages inside a folder through API

Novice User asked on July 31, 2018 20:30

How to get the count of the pages inside a folder, I am using this statement and its giving me count for only root level, If i need the count of pages inside a folder within a folder , it returns me Zero. What do I need to add in here


And How would i get the number of dcoument only for the folder specified, even if there are multiple folders inside it.

Recent Answers

Brenden Kehren answered on July 31, 2018 20:48

Use something like this:

DocumentHelper.GetDocuments().Types("cms.menuitem").OnSite("mysite").Path(myPath, PathTypeEnum.Children).Where("DocumentMenuItemHideInNavigation = 0").Columns("NodeID").Published().Count

0 votesVote for this answer Mark as a Correct answer

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