How to theme a block to dispay muliple nodes in a line.

mcfilms - February 20, 2009 - 18:55

Hi,

I was wondering if anyone has experience with modifying the output of views to display inline.

I am using Views 2 to generate a series of nodes. These four nodes are displayed in the sidebar-left section of my revised theme. Each of these nodes has a picture and a caption that links to a full rendering of that specific node. So far so good. You can see my progress, and my problem, at:
http://motioncity.com/drupal/

As you can see, the nodes are stacked one on top of the other. I would like to have them align right next to each other. According to Dev Module Themer, the file I THINK I want to edit is views-view-fields.tpl.php. But I don't even know what to say. I guess I was hoping it would reference the block and I could somehow apply a display: inline tag somewhere. But that's just not the case. It really looks like a loop that cycles through the field elements and creates the node.

SO, my questions:

1. Am I looking in the wrong place? Should I edit something else besides views-view-fields.tpl.php?

2. Can I just address that through my CSS by setting the left column block to display: inline? (Tried this and it did not work.)

3. Alternatively, can I create 4 DIV elements in this DIV and push my content into them?

Thanks for having a look. Any help would be appreciated

Jerry

use the theme info link in

Scott Reynolds - March 12, 2009 - 21:34

use the theme info link in the Views UI to find out how to theme it up. It provides all the .tpl or theme functions you could use. That should help you.

 
 

Drupal is a registered trademark of Dries Buytaert.