如何在Drupal中呈现YouTube来源?包含信息的字段包含:
[fid] => 59
[display] => 1
[description] =>
[uid] => 1
[filename] => Retarded running giraffe
[uri] => youtube://v/Cn59jVAHLTs
[filemime] => video/youtube
[filesize] => 0
[status] => 1
[timestamp] => 1340129371
[type] => video
[rdf_mapping] => Array
有没有办法将此信息呈现给YouTube-Video嵌入代码?像这样:
drupal_render_youtube('youtube://v/Cn59jVAHLTs');
有没有解决方法可以解决这个问题而不用自己编写孔嵌入代码?
答案 0 :(得分:5)
答案 1 :(得分:0)
或类似的东西:
<?php print render($variables['content']['field_url']['#object']->content['field_video']);?>