Created
February 24, 2012 01:10
-
-
Save rande/1896431 to your computer and use it in GitHub Desktop.
SonataMediaBundle : sonata_media_type template preview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<form method="POST"> | |
{{ form_widget(form.media.binaryContent, {'attr': {'class': 'span8'}}) }} | |
{{ form_rest(form) }} | |
<input type="submit" class="btn" value="Preview Video"/> | |
</form> | |
</div> | |
{% if media and media.providerReference %} | |
<h2>Preview : {{ media.name }}</h2> | |
{% media media, 'reference' %} | |
<p> | |
The <code>media</code> helper is used to render the video. | |
</p> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment