Last active
September 17, 2020 10:26
-
-
Save stevewithington/0ef187072e6898cc3c17634a65ce7d51 to your computer and use it in GitHub Desktop.
Mura CMS v7: Sample YouTube Display Object
This file contains 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
<displayobject name="YouTube Video" contenttypes="*"/> |
This file contains 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
<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> |
This file contains 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
<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