Links To Images Of Slide In Drupal 7

Posted on Dec 8 2012 - 11:38pm by farid

When we add images to our Slide, by default, these images link to their content. However, we can convert these images to link to another site, or what is more interesting, and that is what we will do today, link them to specific parts of our catalog.

Slide In Drupal 7
The first thing we do is to unburden the link module, unzip and install, and activate it as we always do. Then add:

A New Type of Content:

We call it Slide, and add an image field dimensions to our slide.

Now we add a field to include the links

Label: link

Field Name: field_enlace

Field type: link

We leave the other settings as default we come, as this field will be hidden after.

Now add at least 3 Slide content type and proceed to configure: We went to each image you want to appear in the slide and field title link and add the URL to redirect the image.

Now let’s set the view.

We add a new Vista:

View Name: Slide Home

Show: Contents

Type: Slide

Sort: Newest First

Disable: Create a page

Activate: Create a block

Title block: Slide cover

Presentation Format: Views Slideshow

From fields

Items per page: 5

Use a pager: No

Continue and edit.

In Page view editing proceed to:

-Format Options: configure to your liking

-Remove the Field Content: Title

-Add Field: Content: Link: Slide

We disabled create-tag.

-Activate exclude the presentation.

-Formatter: URL, as a link

-We keep changes

-Add a new field: Content: Image Slide

We disabled create-tag.

-Formatter: Image

Image-Style: Slide or we have defined

-Link image to: Nothing

-Rewrite results: Produce this field as link

-Route link: [field_enlace]

-Apply and save changes.

IMPORTANT: so that we can properly configuar the link, the link field must be above the Slide Image field.

Now we just need to go to the configuration of the blocks and the new Slide are located in the region of the page that interests us. Try different settings and check its operation.

About the Author

1 Comment so far. Feel free to join this conversation.

  1. Mark December 25, 2012 at 12:20 am - Reply

    Thanks for your Drupal Tips :D

Leave A Response