There are many screencasts out there that talk about theming but at the moment I am still a bit lost when it comes to theming a cck created type.

Example: I created a (film_uk) cck content type. Now in that I created field tabs and on the 4th field tab I put the images from that specific film. My issue at the moment is all the images are vertical.

Where in all of the files would I change it to make the images horizontal say 4 to a row? is it the image module or a new node.tpl file?

DG..

Comments

jsmm’s picture

Any help?

bsenftner’s picture

This may not be the preferred solution, but I've been able to get horizontal displays of my images and other CCK fields with the ConTemplate module.

With that module, you get a php template for each content type, and you are free to output whatever is necessary to get the layout you desire. I'm being simple at the moment, and just using a really simple loop like this to get 4 centered images per horizontal line:

<div class="field field-type-filefield field-field-gallery">
<h3 class="field-label">Images</h3>
<?php 
      print $node->content['body']['#value'];
      print "<center>";
      $count = 0;
      foreach ((array)$node->field_gallery_image as $item) { 
               print $item['view'];
               $count++;
               if ($count > 4) {
                  print "<br>";
                  $count = 0;
               }
               else {
                  print " ";
               }
      }
      print "</center>";
?>
</div>

They have "help" in the interface where you enter these php snippets: a listing of all the node fields you can access, so it's not too hard to figure out...