Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Nested repeater showing all results View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 5/18/2012 12:52:47 AM
   
Nested repeater showing all results
Hi Guys,

I am trying to create a nested repeater.

I have tried the below code in the parnet repeater's transformation but is not giving appropriate results:


Code: 1
<cms:CMSRepeater ID="RepeaterCourses" runat="server" ClassNames="Northtec.CoursePages" TransformationName="northtec.coursepages.northtec-courseslistinginprogrammes" Path=""+ Eval("NodeAliasPath") +"/%" SelectOnlyPublished="true" />

Output
[CMSDataProperties.LoadTransformation]: The server tag is not well formed

Code : 2
<cms:CMSRepeater ID="RepeaterCourses" runat="server" ClassNames="Northtec.CoursePages" TransformationName="northtec.coursepages.northtec-courseslistinginprogrammes" Path="/{0}/{1}/%" SelectOnlyPublished="true" />

Output:
Shows all the results of that document type.

Code 3:
<cms:CMSRepeater ID="RepeaterCourses" runat="server" ClassNames="Northtec.CoursePages" TransformationName="northtec.coursepages.northtec-courseslistinginprogrammes" Path="/Programme/Agriculture/%" SelectOnlyPublished="true" />

Output:
This gives me right results for only 1st category. By trying the 3rd code it proves that only the path is wrong everything else is fine.




Any ideas what mistake am I doing with the path.

Thanks
Gitesh Shah

User avatar
Kentico Support
Kentico Support
kentico_janh - 5/18/2012 6:53:46 AM
   
RE:Nested repeater showing all results
Hello,

Could you please define your Path property like this:

<cms:CMSRepeater ID="RepeaterCourses" runat="server" ClassNames="Northtec.CoursePages" TransformationName="northtec.coursepages.northtec-courseslistinginprogrammes" Path="<%# Eval("NodeAliasPath") %>/%" SelectOnlyPublished="true" />


Best regards,
Jan Hermann

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 5/20/2012 7:36:36 PM
   
RE:Nested repeater showing all results
Thanks Jan,

Found the issue. I have actually not mentioned the nested repeater ID name in the parent repeater.

now it works fine and thanks for the code.

Cheers
Gitesh Shah

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 5/20/2012 10:09:20 PM
   
RE:Nested repeater showing all results
Hi Jan,

One more issue now.

How can I find that the child repeater is not having any values?

e.g. Parent repeater will load the transformation only if it has any child nodes in it?

Thanks
Gitesh Shah

User avatar
Kentico Support
Kentico Support
kentico_janh - 5/21/2012 2:24:59 AM
   
RE:Nested repeater showing all results
Hello,

You can set the HideControlForZeroRows property to true for your child repeater to hide it, if it doesn't contain any data:

HideControlForZeroRows="true"


Best regards,
Jan Hermann