I've created a teaser template like this node--type--teaser.html.twig
.
Within that template I want to conditionally create a link to a file that was uploaded via the field field_pdf
.
How do you extract JUST the path to the pdf in the template.
I've tried {{ file_url(node.field_pdf.entity.url.value) }}
but that just brings back an empty path.
If thats not possible, is there a way to get a file path from the fid
in twig?
uri
, noturl
.{{ file_url(node.field_example_image.entity.uri.value) }}
.File
.