DocumentHelper documentation

Gijs Roest asked on October 6, 2014 11:48

Hello Kentico support,

I am working on a fairly complex formcontrol. I really need it to be as efficient as possible and that's why I am very eager to user the new DocumentHelper mechanisms.

I am trying to retrieve the direct children of a related-document with a certain (page)type. I know how to do it with two queries (all values within brackets ([ ]) are variables):

MultiDocumentQuery relatedDocuments = DocumentHelper.GetDocuments().InRelationWith([GUID],[RelationShipName]);`

Then for each TreeNode relatedDocument in relatedDocuments:

DocumentQuery relatedChildren = DocumentHelper.GetDocuments ([ChildPageType]).Path (relatedDocument.NodeAliasPath, PathTypeEnum.Children);

The relatedChildren have custom fields / columns and I need them to be accessible (hence the ChildPageType necessity).

I've looked into the documentation found at: [] and the forums: [], but I am not able to get the above into one (1) query.

Any help?

Recent Answers

Yehuda Lando answered on October 9, 2014 18:29

You will have to use .Join, or even make your own query. If you can post the full code, it will be easier to help you.

0 votesVote for this answer Mark as a Correct answer

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