While upgrading kentico 10 to kentico 11 below class removed
Class CMS.DocumentEngine.TreeHelper was removed. You can use class CMS.DocumentEngine.DocumentQuery instead.
while addding DocumentQuery am getting error.
Before code
return CMS.DocumentEngine.TreeHelper.SelectSingleNode(RolePath, true, CAREER_PATH_DOC_TYPE);
After code change to
return CMS.DocumentEngine.DocumentQuery.Equals(RolePath,true, CAREER_PATH_DOC_TYPE);
there are only two options providing after DocumentQuery 1)Equals 2)ReferenceEquals How I can achieve this change in kentico 11
Hi Anil
Refer this answer link it may be help you.
Here is come documentation on document query.
You would probbaly do something like this:
return DocumentHelper.GetDocuments("Document.Classname").Path("nodealiaspath").FirstorDefault();
You might want to read up on what document query is and how it works!
It's available since Kentico 8. Here is an nice article explaining what changed: (note it's for Kentico 8): devnet.kentico.com/articles/kentico-8-technology-documentquery-api
and here is the documentation on all available items in Kentico 11: docs.kentico.com/k11/.../retrieving-database-data-using-objectquery-api
Please, sign in to be able to submit a new answer.