views:

752

answers:

2

Hiya,

I'm building a recipe management system for a cooking website in Drupal, and I have to say the whole node / view / template thing is working very nicely! I've got one problem though and that is that I can't get a view to display JUST an image - it always comes bundled with it's title and a link through to the gallery.

Can anyone help me work out how to reference an image from a view, only displaying the image itself with no linkage or anything else?

Setup

  • Image installed
  • Content type "recipe" created
  • CCK Image field used to bring image into "recipe"
  • View created - has the right image field referenced

Can select "body" or teaser on the view options for the image field, but neither is correct really. I thought about trying to re-write the output of that field, but there is no way of just passing along the file path it seems.

H

+2  A: 

It sounds like you're using the node row style. If you set the row style to fields, you should be able to just display the image field.

jhedstrom
That was it! Just had to change the field I was trying to use from a node-reference to an actual CCK image field. Then when the image was uploaded via the content creation form, I could reference just the image from within the views set up. Drupal really isn't simple sometimes...
hfidgen
+2  A: 

Personally I use ImageCache for all image manipulations. Then you get a lot of options when you edit the Display Fields of your node type, e.g.

  • Image display with link to node
  • Image display with no link
  • Thumbnail display with link to original picture
  • Thumbnail display with no link

etc etc. Very useful, but it might confuse things further to have another image-based module doing things!

x3ja
TBH I'm not overley impressed with Drupals base ability to handle files or images. It requires a great deal of configuration of PHP knowledge to get it right. Sounds like Drupal 7 is addressing this though, will be interesting to see!
hfidgen