ASPX templates
Version 5.x > ASPX templates > How to Get Documents without its Child documents View modes: 
User avatar
Member
Member
aneeshsiva-gmail - 5/11/2011 2:37:26 AM
   
How to Get Documents without its Child documents
How to select nodes without the child nodes.

I have a documents in three levels and populated using cms:Repeater
Example:
1.Programs
1.1 Projects
1.1.1 Mini Project
1.1.2 Main Project
1.2 Seminars
1.3 Workshop
I set the document Path ‘ Path=" Programs/%" ‘so I got all the documents under Programs But I need to select only second level documents (Projects, Seminars & Workshop). Please suggest a solution.

Regards
Aneesh SIvan

User avatar
Kentico Support
Kentico Support
kentico_radekm - 5/11/2011 2:53:53 AM
   
RE:How to Get Documents without its Child documents
Hello.

You can also use special expressions that extract parts of the current path, such as this.

Examples:

/{0}/{1}/% - all documents under the second level of the current path

/{0}/{1}/details - document Details under the second level of the current path

Best Regards,
Radek Macalik

User avatar
Member
Member
eric.rovtar - 5/11/2011 11:36:47 AM
   
RE:How to Get Documents without its Child documents
I think what you're looking for is the "MaxRelativeLevel" property. Set that to 1, the repeater will only return Projects, Seminars, and Workshop.

User avatar
Member
Member
aneeshsiva-gmail - 5/11/2011 11:41:27 PM
   
RE:How to Get Documents without its Child documents
Yes This is what I want. Thank you very much Eric


Aneesh Sivan