Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dpfields = array();
- foreach ($this->item->dpfields as $f) { $dpfields[$f->alias] = $f; }
- $video = $dpfields['video'];
- $urlvideo=$video->value;
- if (!empty($urlvideo)) :
- echo '<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class="embed-container"><iframe src="http://www.youtube.com/embed/'.$urlvideo.'" frameborder="0" allowfullscreen></iframe></div>';
- ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement