Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Different layout for items on repeater. View modes: 
User avatar
Member
Member
Leandro Brito - 9/13/2011 1:33:11 PM
   
Different layout for items on repeater.
Hello,

I have a repeater that show "news".
I need show 5 items, but the first and the last one have a different layout.

e.g:

- first item have a image with 40x40, title and summary align on left.
- second, third and fourth items have foto 20x20, title and summary and align on right.
- five item has only title and align bellow the fourth item.

I thought do 5 webparts with 5 differents transformations, but I think it isn't correct and I don't know how show especifics intervals like SQL Limit(2,4) or something like that.

How can I do this?

Thanks
Leandro

User avatar
Member
Member
Leandro Brito - 9/13/2011 2:56:10 PM
   
RE:Different layout for items on repeater.
I think my answer is here:

http://www.kenticodeveloper.com/Matthew-Lee/September-2009/Conditional-transformations-in-Kentico.aspx

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 9/13/2011 3:59:52 PM
   
RE:Different layout for items on repeater.
Hello,

The mentioned approach should work. There are also variables available, which determine the item number. You can use them to create different outputs for the 1st and 5th item:

<%# DataItem %>
<%# DataItemIndex %>

Best regards,
Boris Pocatko