Hi everyone,
I'm trying to accomplish this simple thing but cannot find a way to do it.
If someone could guide me a little bit because I'm going inside deep crazy methods and classes, but I'm sure I'm going the wrong way and there's a simple way to accomplish this :)
I have a view block, that displays these fields :
- Content: Title (the title)
- Content: Image (Image)
- Content: Pdf (File Upload)
So, the title, the image and the file upload are displayed.
I would like to output something like this :
<a href="__link_to_my_pdf__">
__Title__
__Image__
</a>
Is there a way to do this through the view management ?
If not, what could be the right way ? Twig ? Preprocess ? Module ?
I tried through a views-view--myviewblock.html.twig to get the variables inside {{rows}}, but spent 4 hours and failed.
Thanks in advance.
Comments
View trick
Yes you can manage it from views ui itself. steps are
Thank you very much.
Thank you very much.
It's exactly what I wanted.