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.

Revisions

  1. @stevewithington stevewithington revised this gist Jul 20, 2016. 2 changed files with 19 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion configurator.cfm
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    <div class="mura-layout-row">
    <div class="mura-control-group">
    <label class="mura-control-label">YouTube URL</label>
    <input type="text" name="text" class="objectParam" value="#esapiEncode('html_attr',objectParams.youtubeurl)#"/>
    <input type="text" name="youtubeurl" class="objectParam" value="#esapiEncode('html_attr',objectParams.youtubeurl)#"/>
    </div>
    </div>
    </cfoutput>
    19 changes: 18 additions & 1 deletion index.cfm
    Original file line number Diff line number Diff line change
    @@ -1 +1,18 @@
    Hello from YouTube Video.
    <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>
  2. @stevewithington stevewithington created this gist Jul 20, 2016.
    1 change: 1 addition & 0 deletions config.xml.cfm
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    <displayobject name="YouTube Video" contenttypes="*"/>
    13 changes: 13 additions & 0 deletions configurator.cfm
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <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="text" class="objectParam" value="#esapiEncode('html_attr',objectParams.youtubeurl)#"/>
    </div>
    </div>
    </cfoutput>
    </cf_objectconfigurator>
    1 change: 1 addition & 0 deletions index.cfm
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    Hello from YouTube Video.