Using View's module it is possible to create a page to display some content horizontally. I have done this using carousel feature.
The content type that these contents belong to have an image_field
and a body_field
.
What I want from Drupal 8 is that when these images are clicked they should redirect visitors to a specific page (not to the node's / content's page).
Is it possible to do so or using html on body_field
to place the images with a
and img
tags is the only way?
UPDATE:
At first I understood nothing from the answer below but a day later it just made sense like in the movie "Phenomenon"; I was struck by a mysterious light in the sky. Here is what I did:
Created a new
link_field
inside the content type that I am using on this View.Went back to the content / node (under Content) where I wanted to add the link to the image and filled the
link_field
Added this newly created
link_field
to the View and made it hidden by checking the box titled "Exclude from display".Clicked on the
image_field
on View settings (under the FEILDS) and REWRITE RESULTS > check the box "Output this field as a custom link" (An empty area shows up to be filled here).Went down and expanded the drop down list titled "REPLACEMENT PATTERNS" and found the
link_field
's name (The name you gave to yourlink field
you have created it) and copied the string (something like{{ the_name_of_my_link_field }}
).Pasted this string into the empty area above then Saved, Saved, Saved to exit.
That's all!