When creating a view there is an option for the title to link to the content: check box with “Link this field to the original piece of content”, but what about other elements, like an image? or a button?
For this there is a work-around:
- add
Content: Path
field as one of the fields in the view. Inconfigure field
modal box checkExclude from display
to hide this field from being displayed and rearrange fields so this field is above the fields you want to be linked to the content. - click the field you want to be linked to the content to open
configure field
modal box and in theRewrite results
section checkRewrite the output of this field
. - in the opened textarea under
Rewrite results
write this:<a href="[path]">[field_name]</a>
. you should replacefield name
with proper token of the field you want to be linked. you can find all the fields token in theReplacement patterns
section underRewrite results
. - you can repeat this for other fields in the view as long as they are below the
Content: Path
field.