2

I created a Banner content type, which has an image and a Link fields. I allowed the upload of multiple images and adding multiple links in this content type.

I am using the Image Link Formatter module, which adds a formatter to display an image with a link. This works fine when I add a Banner node and preview it. I want this banner to be displayed by the Views Slideshow module.

Unfortunately, it doesn't work in a view block. When I choose to display the content, it renders all the banner images in a single slide (as might be expected). When I select the banner image field only, and choose the Image Link formatter, it displays the banner images, but not the links.

I tried hiding the link field, but this has no effect.

As an alternative solution, I tried following HOW TO INSTALL & SETUP VIEWS SLIDESHOW MODULE ON DRUPAL7? which suggests to use the Output this field as a link option for the image (which I did) and set it to the link field. This doesn't work as expected: The mapping multiplied the amount of banners, and output each banner once for eachlink.

How should I accomplish what I am trying to achieve?

4
  • Instead of the Image Link Formatter, try outputting as a link via "Rewrite Results" - that's the way I always do it and I can't recall having a problem
    – Clive
    Oct 22, 2014 at 10:46
  • 1
    That's not something I've tried; the idea of Views Slideshow is that it creates multiple slides, each slide represented by a single node. What you want to do makes sense conceptually, but it's not how the module was written to handle things
    – Clive
    Oct 22, 2014 at 11:57
  • I believe this approach is not the best practice in Drupal -> one node, multiple links and images. One reason is exactly the problem you are facing! even though it seems tidy, it causes more headache later. Later you may decide to reuse your content and all of them aggregated in one node cause more trouble.
    – hkoosha
    Oct 22, 2014 at 14:56
  • 2
    So I would put one link and one image in a node, follow Clive's approach, and if I needed to link multiple images and links together I'd create a second content type with a entity reference field for that.
    – hkoosha
    Oct 22, 2014 at 14:58

1 Answer 1

0

As pointed out by the comments posted under the question, the problem is that there are multiple images on a single node. To avoid problems like this, there should be one node per slide.

Your Answer

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