I have a twig template for a custom block, I want the entire block to be wrapped in a link. I'm using the link field, but I'm not sure how to get the url from the field within the twig template. This seems like it should work, but doesn't:
{{ content.field_link.0.getUri() }}
I've looked at url()
and path()
, but they are dealing with routing, so I don't think that's what I'm looking for.
Note, I would like to use either external or internal links in the field.