Design and CSS styles
Version 4.x > Design and CSS styles > Repeater control as <ul> View modes: 
User avatar
Member
Member
J - 7/18/2009 9:07:13 PM
   
Repeater control as <ul>
Does anyone have any good strategies for rendering repeater controls as List items (<ul><li></li></ul>).

When I rap the control in a <UL> tag then it also contains the pagination and then when displaying an individual item it also renders the <UL> around the item which is not ideal.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 7/20/2009 8:07:16 AM
   
RE:Repeater control as <ul>
Hello,

I added <ul> to Content before property and </ul> to Content after property and <li> … </li> to Transformation and it works correctly even together with pagination. Do you have any problems with this solution?

Best regards,
Helena Grulichova

User avatar
Member
Member
J - 7/22/2009 10:01:09 PM
   
RE:Repeater control as <ul>
Perfect :)

User avatar
Member
Member
Raymond A - 11/4/2011 10:30:32 AM
   
RE:Repeater control as <ul>
Hi, i do have the same issue.
Where can i find the the "Content before field"/

thanks

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 11/13/2011 7:44:17 PM
   
RE:Repeater control as <ul>
Hi,


it is a general web part field, all web parts have it. What web part/control do you use?


Best regards,
Helena Grulichova

User avatar
Member
Member
jheavner-ce - 2/3/2012 10:54:52 AM
   
RE:Repeater control as <ul>
So when I try to do this with a basic repeater I'm getting a <div> tag stuck in between my <ul> and my <li> items. The div tag is messing with some jquery rendering I'm trying to do.

I tried using both content before...after as well as defining a web part container and both methods insert the <div>.

Any ideas?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/19/2012 1:30:14 AM
   
RE:Repeater control as <ul>
Hi,

It is working fine for me - unless I am missing something. What is your transformation like? Which data source web part are you using with the basic repeater? Also, which version of the CMS are you using?

Best regards,
Juraj Ondrus

User avatar
Member
Member
jheavner-ce - 2/21/2012 8:51:46 AM
   
RE:Repeater control as <ul>
I figured in out. If I check the box to use the update panel then it inserts the <div> otherwise it doesn't. Can you verify that you see the same behavior? I do believe that the inserted <div> should be placed outside of any container that the user wants to use on the repeater.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/22/2012 7:46:55 AM
   
RE:Repeater control as <ul>
Hi,

the DIV tag is being added by the update panel. In this case you need to place the repeater web part in a web part zone and set this zone to use the update panel.

Best regards,
Juraj Ondrus