I have an Entity reference field field_video. It's a core Media field with a Reference type of Remote video.

Because I use this field_video in my Hero section I need some additional markup here.

From the admin node/add/page, the editor can insert a Youtube remote video (url).

When I debug the page I see the following variables (see screenshot).

enter image description here

How do I render the media url in node--page.html.twig? Then I am able to build the correct HTML markup and styling around it.

1 Answer 1


To get the uri of remote video in node--page.html.twig try with:

  • Thanks that's working. How could I have debugged this? I am using Xdebug and PhpStorm to debug.
    – meez
    Commented Jan 20, 2020 at 20:34
  • I use drupal.org/project/twig_vardumper module and i dump the entity {{ dump(node.field_video.entity) }} to see the the fields inside the referenced entity
    – berramou
    Commented Jan 20, 2020 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.