CombineWithDefaultCulture principle when using Pages field type

Volodymyr Rets asked on March 8, 2019 20:32

Hello guys, how can I use CombineWithDefaultCulture principle when i use Pages field type?

Kentico calls TreeNode.GetRelatedDocuments() which does not work with CombineWithDefaultCulture principle. GetRelatedDocuments method summary:

Retrieves a query that selects documents related to the current document with the relationship name given by specified field. Selects only documents of the same culture as the parent node.

Is it possible to force this method somehow?

Thank you.

P.S: There is one way, using DocumentQueryBase.InRelationWith(), but it requires Related Pages field type.

Correct Answer

Volodymyr Rets answered on March 8, 2019 21:52

Ohh, GetRelatedDocuments returns MultiDocumentQuery, which has CombineWithDefaultCulture method.

0 votesVote for this answer Unmark Correct answer

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