All in the title : How to programmatically embed video from tpl files ?

thank you for this GREAT module.

Cheers,
jramby.

Comments

jeffglenn’s picture

I see it's a little late in the reply but I thought I might anyway.

It depends on what .tpl you are wanting to print in. Printing an embedded video in the page.tpl has given me problems in the past but I found this solution that has worked great for me (not sure if it's the best way to do it):

<?php print render(field_view_field('node', $node, 'field_NAME')); ?>

Printing in a node.tpl should be much easier:
<?php print render($content['field_NAME']); ?>

Hope this helps!

plopesc’s picture

Issue summary:View changes
Status:Active» Fixed

Marking as fixed

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

maxplus’s picture

Thanks,

This worked for me to:

<?php
print render($content['field_NAME']);
?>