Rendering multiple fields/parts as one

Topics: Customizing Orchard, General, Writing themes
May 2, 2011 at 10:01 AM

Hi,

I have a content type that contains a image field, route part (title), and body. When displayed in a list/search it renders the "summary" shapes. Currently when the title linked to the "display" view.

How can I render the "summary" view with the title link surrounding the image and body as well?

Currently I'm using javascript but was hoping there maybe a better way.

Thanks,

Coordinator
May 2, 2011 at 9:20 PM

Customize the summary template for that type in your theme and put those in there. That's one approach but I don't like it much as it's freezing what you can have in there. I'd instead customize the template for the image field and body part and add a copy of the link in there (rather than have one link surround everything). Even better, add a wrapper to both of those shapes from your placement and put the link in there.

May 11, 2011 at 7:18 AM

I am trying to accomplish similar task with similar parts, where I would like to display the image in the first 30px and have the title and body cover rest of the area. how can I split the content area into two columns?

Coordinator
May 11, 2011 at 7:33 AM

CSS?

May 11, 2011 at 12:17 PM

You could add a new zone in an override of Content.cshtml, then use CSS to position your new zone (and use placement to send the relevant parts there).

May 12, 2011 at 5:09 AM

Thank you randompete!