hello forum,
what is the best way to add an image as "heading" to a view? sure, you can add the image by node-view-viewname.tpl.php, but i am wondering if this isn't somehow cumbersome and slow.

Comments

kylecop1’s picture

hmm, I am not sure if I understand your question but I am trying to help.

When you create a view it pulls information from content that you have posted on your website. Take for example the content type of article. If you have 3 articles posted with images added to them you can pull those three images through the view by filtering the content type of: article, and using the field of Image.

You then are able to add images to your view by creating more articles.

adam1’s picture

... pulling the images out of filtered nodes into the view is not my problem, that works perfectly. what i want is a special icon to introduce each different view – for example i have three views collecting nodes:

  • one, which collects all nodes tagged with "humans"
  • anotherone, which collects all nodes tagged with "animals"
  • an a third one, which collects all nodes tagged with "plants"

each of these three views has it's own title heading (humans, animals, plants), but beside the title i want an image to appear (an icon of a human, of an animal and of a plant).
maybe ist best done by implementing the image via css, not by editing the file node-view-viewname.tpl.php... ?

kylecop1’s picture

if you have three different displays there will be three different unique classes added to the view that you can add a unique title via css. It looks like you answered your own question.