0

I have a flex banner that displays images from a content type I have created for the banner. In my banner view I can only link the image to the original image, the banner page or nothing. My goal is to be able to assign links to some of the banners. For example link slide 1 to a basic page, slide 2 to an article and slide 3 to another custom type page. My googling skills seem to let me down here.

I know that you can meet these requirements on different platforms for example on magento you can use 'Magestore_BannerSlider' where for each banner you upload an image, set up the dates to display from X to Y, add a unique link to each banner or if left empty it is not linked.

I am interested if I can get similar functionality using Drupal.

1

To do that you can simply:

  1. Add new text field to your content type and name it Link for example.
  2. Add this field into your view, hide it by check 'Exclude from display' in views field settings and move it above your banner image field.
  3. Open views settings for the banner image field, under 'Rewrite results ' section check 'Output this field as a link' and put replacement pattern for your link text field in 'Link path' input, e.g. [field_link].
  4. Save your view and now each banner is linked to any path you specify in the Link text field or is not if you leave this field empty.

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.