We're using Dukt Videos to display a video on this page of our website. However, the video no longer appears on the page and just shows the HTML for the iframe.

Any idea what has happened?

  • Twig raw filter? – John Moylan May 23 '16 at 8:13
  • Ah, just seen this is for Duke plugin which I don't think needs raw. – John Moylan May 23 '16 at 8:23
  • Can you post your template code? It looks like the html for the video is being outputted as a plain text string. – Luke Pearce May 23 '16 at 10:23

You probably need to add the twig raw filter to your field variable. This will allow twig to interpret the data as safe HTML rather than just plain text.

{{ myFieldVariable|raw }}

Lear more about the raw filter here: http://twig.sensiolabs.org/doc/filters/raw.html

  • 1
    Fwiw, if you're using a plain text field for admin to drop in embed code (e.g., not using duktvideos) and see the code output as text, this fix applies there, too. – philzelnar Aug 7 '16 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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