Try our conversational search powered by Generative AI!

List unpublished children


Hi! It seems that GetChildren() in IContentRepository only returns published pages. How do I get a list of all children, including the unpublished ones?

Regards Christer

Jun 17, 2014 15:58
try this
 var pages = DataFactory.Instance.GetChildren(CurrentPage.PageLink, LanguageSelector.AutoDetect(true));
Jun 17, 2014 17:01

I find it odd but maybe there is a reason for this that in ordered to get unpublished pages, you have to pass in a language.  This is right K Khan but you would think and overload for Publish status or booleaon for get children would accept the following.  I have always been baffled by this but I am not the dev but have found it curious.

Jun 17, 2014 18:57

Thanks! Adding a languageselector to GetChildren() returns all the pages. Weird...

Jun 18, 2014 13:34
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.