Skip to content

Instantly share code, notes, and snippets.

@jsieber
Forked from stevewithington/config.xml.cfm
Created December 20, 2016 19:29
Show Gist options
  • Save jsieber/378ea452e3a570f98ef946a69f33242f to your computer and use it in GitHub Desktop.
Save jsieber/378ea452e3a570f98ef946a69f33242f to your computer and use it in GitHub Desktop.
Mura CMS v7: Sample YouTube Display Object
<displayobject name="YouTube Video" contenttypes="*"/>
<cfsilent>
<cfparam name="objectParams.youtubeurl" default="">
</cfsilent>
<cf_objectconfigurator>
<cfoutput>
<div class="mura-layout-row">
<div class="mura-control-group">
<label class="mura-control-label">YouTube URL</label>
<input type="text" name="youtubeurl" class="objectParam" value="#esapiEncode('html_attr',objectParams.youtubeurl)#"/>
</div>
</div>
</cfoutput>
</cf_objectconfigurator>
<cfsilent>
<cfparam name="objectParams.youtubeurl" default="">
</cfsilent>
<cfoutput>
<p>Hello from the YouTube display object.</p>
<div class="youtube-wrapper">
<iframe id="ytplayer" type="text/html" width="640" height="390"
src="https://www.youtube.com/embed/#ListLast(objectParams.youtubeurl, '=')#"
frameborder="0"></iframe>
</div>
<p><a href="#objectParams.youtubeurl#" target="_blank">Watch on YouTube</a></p>
<!--- <cfdump var="#objectParams#"> --->
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment