Skip to main content
Bounty Ended with 50 reputation awarded by Jay
added 66 characters in body
Source Link
kalabro
  • 7.9k
  • 35
  • 46

It can be done with Views rewriting options.

  1. Add both fields (Image before Video) to Views and exclude Image field from output.
    enter image description here
  2. For Video field set “NO RESULTS BEHAVIOR” to Image field placeholdertoken: enter image description here

It means that if Video field is empty Views will get value from this textarea, which contains special placeholders (in this case [field_image]).

PlaceholdersAvailable tokens for your fieldfields can be found under “REWRITE RESULTS” fieldset: enter image description here

Don't forget to uncheck “Rewrite the output of this field” flag.

It can be done with Views rewriting options.

  1. Add both fields (Image before Video) to Views and exclude Image field from output.
    enter image description here
  2. For Video field set “NO RESULTS BEHAVIOR” to Image field placeholder: enter image description here

It means that if Video field is empty Views will get value from this textarea, which contains special placeholders (in this case [field_image]).

Placeholders for your field can be found under “REWRITE RESULTS” fieldset: enter image description here

It can be done with Views rewriting options.

  1. Add both fields (Image before Video) to Views and exclude Image field from output.
    enter image description here
  2. For Video field set “NO RESULTS BEHAVIOR” to Image field token: enter image description here

It means that if Video field is empty Views will get value from this textarea, which contains special placeholders (in this case [field_image]).

Available tokens for your fields can be found under “REWRITE RESULTS” fieldset: enter image description here

Don't forget to uncheck “Rewrite the output of this field” flag.

Source Link
kalabro
  • 7.9k
  • 35
  • 46

It can be done with Views rewriting options.

  1. Add both fields (Image before Video) to Views and exclude Image field from output.
    enter image description here
  2. For Video field set “NO RESULTS BEHAVIOR” to Image field placeholder: enter image description here

It means that if Video field is empty Views will get value from this textarea, which contains special placeholders (in this case [field_image]).

Placeholders for your field can be found under “REWRITE RESULTS” fieldset: enter image description here