0

I have a site where the user can add images to the content types page and (custom) project. These images are displayed in a views slideshow based on contextual filter on each page/project in a block. The slideshows are header slideshows, so there must be a placeholder slideshow, if no images are added. How can i accomplish this ? I need a solution where no further maintenance by the user is needed.

Do i have to put some if/else in the page.tpl.php or is there some more elegant way ?

1

Your slideshow is a View. So:

  1. Go to edit page of your view
  2. Expand "Advanced" field set
  3. Add new item into "NO RESULTS BEHAVIOR"
  4. Choose "Global: Text area"
  5. Add your placeholder html there. E.g. <div class="no-images-placeholder">NO-IMAGES</div>
  6. Save View
1

The Answer of milkovsky pointed me in the right direction:

  1. Go to edit page of your view
  2. Expand "Advanced" field set
  3. Add new item into "NO RESULTS BEHAVIOR"
  4. "Choose "Global: View area"
  5. View to insert -> choose the placeholder view to display instead
  6. Add another contextual filter "GLobal Null"
  7. WHEN THE FILTER VALUE IS NOT AVAILABLE -> Display contents of "No Result found"
  8. Save view

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.