ASPX templates
Version 3.x > ASPX templates > Tree: select multiple Nodes by document properties View modes: 
User avatar
Member
Member
r.rijnsewijn-tfe - 10/15/2009 6:46:36 AM
   
Tree: select multiple Nodes by document properties
Is it possible to select multiple Nodes from the CMS.TreeEngine.TreeProvider by document properties?

For my newsoverview I have added a new field in my document type (ArchiveDate). And I am trying to select newspages on this property.



User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 10/15/2009 8:17:32 AM
   
RE:Tree: select multiple Nodes by document properties
Hello,

yes, you may select nodes by this API methods. You may use your fields inside the WHERE condition.

Do you have some problems?

Best regards,
Helena Grulichova

User avatar
Member
Member
r.rijnsewijn-tfe - 10/15/2009 8:37:34 AM
   
RE:Tree: select multiple Nodes by document properties
My question is, how would i code my 'where' condition in the TreeHelper.SelectNodes?

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 10/16/2009 3:16:53 AM
   
RE:Tree: select multiple Nodes by document properties
Hello,

You simply use a where condition, as you would in a SQL command. For example "DocumentID = 23". Please find an example bellow:

SelectNodes(ALL_SITES, "/%", ALL_CULTURES, false, null, "DocumentID = " + documentId, "NodeLinkedNodeID ASC", ALL_LEVELS, false, 1, columns);

Best regards,
Boris Pocatko