Created
February 18, 2021 08:53
-
-
Save gobinathm/a5f0037d89ce588237e433493da32bc7 to your computer and use it in GitHub Desktop.
Drupal 8/9 - TWIG get file url in node template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Get Fully Qualified URL #} | |
{{ file_url(node.field_file.entity.uri.value) }} | |
{# Get URL of multi file field #} | |
{{ node.field_file['#items'].entity.uri.value }} | |
{# Get URL of single file field #} | |
{{ node.field_file.entity.uri.value }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment