ASPX templates
Version 5.x > ASPX templates > Help with transformations View modes: 
User avatar
Member
Member
lwhittemore-emh - 6/1/2011 9:34:52 AM
   
Help with transformations
Hello, I am very new to the kentio platform and also new to using asp and .net.

what I am trying to do is display a div every 3 times the repeater goes through. so you would have something like this

item1
item2
item3
div
item4
item5
item6
div

Thanks for any help on this.

User avatar
Member
Member
lwhittemore-emh - 6/1/2011 10:17:07 AM
   
RE:Help with transformations
This seemed to work.

<%# ((1+DataItemIndex)%3)==0?"<div class=\"cl\"></div><hr>":"" %>

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/1/2011 10:20:51 AM
   
RE:Help with transformations
Hello,

This is an elegant approach. Another approach would be to use a nested repeater, however it wouldn't be so fast as your approach.

Best regards,
Boris Pocatko