Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Using Repeater to Display Images in a certain format. View modes: 
User avatar
Member
Member
iweber - 5/17/2013 10:12:14 AM
   
Using Repeater to Display Images in a certain format.
Hi everyone. I'm hoping that an ASP.net expert can help me here in what I am trying to do. Been working with Kentico for about a week now, starting to get the hang of things but still looking for advice.

I'm working right now with writing the transformation of a repeater. The repeater is taking in data from a custom table which I made, which has 5 different text fields, and one image.

What I want to do is this: I want to display the texts on the left hand side of the page, and the corresponding image on the right hand side of the page, next to the texts. A simple <br> or 2 separates the previous entry from the next. It will look like:

Company Name
Description |------------------------------|
Description2 Image goes about here.
Description3 |------------------------------|
Description4

Anyone know how to do this? I'm willing to try out many different options, whether it's messing with the transformation, adding another webpart/div, or anything else. I'm at an unpaid internship and I'm here to learn, and have been given this small project to complete. Thank you in advance.

User avatar
Member
Member
iweber - 5/17/2013 10:14:06 AM
   
RE:Using Repeater to Display Images in a certain format.
Okay what I described it to look like is wrong. Couldn't find the edit button to edit my original post, but where I said the image should go, that should be much further right, basically at the other edge of the div.

User avatar
Member
Member
kentico_sandroj - 5/17/2013 9:52:37 PM
   
RE:Using Repeater to Display Images in a certain format.
Hi,

In order to display images in a transformation you would have to add one of two special controls into the transformation. How that's done is explained in the developers guide.

Also, styling the images in a transformation is done just like any other elements on a page. You could use CSS either directly in the transformation or assign an ID to the image div and style it in a separate sheet. You could do something like:

style="float:right" or style="margin-left:50%" etc.

Should you need any additional clarification, please let me know.

Regards,
Sandro