ASPX templates
Version 7.x > ASPX templates > Limit Repeater results to direct child documents, rather than showing all documents in menu tree View modes: 
User avatar
Member
Member
p.murray-rocksolid.com - 9/18/2013 6:09:22 PM
   
Limit Repeater results to direct child documents, rather than showing all documents in menu tree
Hi
I am using a repeater on a custom ascx template, in order to get documents (video files) that are direct children (i.e, next level down) of the document that the web-part is placed on.

I have a top menu parent page and a child sub-menu page sharing the same template containing the video repeater. The repeater displayed on the top menu parent is picking up video's that are placed under child sub-menu items. But I only want the repeater to display the video on the child sub-menu page, not the parent top-menu page (ie, the repeater seems to be picking up all video files in the menu tree, not just those that sit directly underneath it).

I've tried variations of setting the path for the repeater (per document here : http://devnet.kentico.com/docs/5_5/controls/index.html?path_specification_in_web_part.htm)
to only show direct child documents, with no luck.

Here is the repeater opening tag: <cms:CMSRepeater ID="repVideo" runat="server" ClassNames="custom.VideoResource_Inside" OrderBy="NodeOrder" OnItemDataBound="repVideo_ItemDataBound" >

Any help would be appreciated.
Thanks
Pat

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/19/2013 1:08:27 AM
   
RE:Limit Repeater results to direct child documents, rather than showing all documents in menu tree
Hi,

Have you tried using the MaxRelativeLevel property to tell how deep the repeater should go? default value is -1 (all levels). Then, it goes from 0 for first level from site root, 1 second level, etc.

Best regards,
Juraj Ondrus