0

I know that I can set default images for content types, but for my page, I would like to only display the default image for one particular view and not the other ones.

It would also be nice if the image is automatically displayed in the proper image style just like a regular image. Therefore it seems that I can't use "no results behavior" since there, I would have to specify the full html myself.

So can I somehow tell drupal 7 to use a default image for a view in case there is no image for an article such that it does not affect any other views?

1

Add custom text in that particular view & fetch the image by using html code. Try this, this can 100% solve your query.

  • Could you elaborate on which html code to write? Via [field_news_images], I can fetch the image if there is one, but how would I provide the default value, such that the same style is applied? – user51122 Dec 12 '14 at 12:51
  • 1
    @user51122 You apply the style manually in GIMP or whatever is your photo editor of choice. NishantP's answer is simple and elegant. You can also use Views to output the image as a link. – J. Reynolds Dec 15 '14 at 14:39
0

Assuming you are working with the default Article content type of Drupal 7.x

enter image description here

You should add something similar to this in your NO RESULT BEHAVIOUR of your IMAGE field in your VIEWS

enter image description here

  • Yes, but the other image settings (image style, link image to, ...) are then then not applied to the default image, are they? – user51122 Dec 12 '14 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.