Creates
a slide dynamically from a source file or HTML and CFML code on
the ColdFusion page. The cfpresentationslide is
a child tag of the cfpresentation tag.
ColdFusion
9: Added the slides attribute. Added PowerPoint
file support to the src attribute.
ColdFusion 8: Added this tag.
Data output tags
<cfpresentation ...>
<cfpresentationslide
advance = "auto|never|click"
audio = "pathname relative to the CFM page or the web root for audio file"
authPassword = "authentication password"
authUser = "authentication user name"
duration = "duration of slide in seconds"
marginBottom = "margin in pixels"
marginLeft = "margin in pixels"
marginRight = "margin in pixels"
marginTop = "margin in pixels"
notes = "text string"
presenter = "presenter name"
scale = "decimal"
src = "absolute path|URL|path relative to CFM page"
title = "text string"
userAgent = "HTTP user agent identifier"
video = "pathname relative to the CFM page
or the web rootfor video file"
useExternalProgram = "true|false" />
</cfpresentation>
attributeCollection attribute
whose value is a structure. Specify the structure name in the attributeCollection attribute
and use the tag’s attribute names as structure keys.cfchart, cfpresentation, cfpresenter, cfreport, Creating
Slide Presentations in the Developing ColdFusion Applications
Attribute |
Req/Opt |
Default |
Description |
|---|---|---|---|
|
Optional |
See Description |
Overrides the
|
|
Optional |
Pathname of the audio file relative to the CFM page or the web root. The audio file must be an MP3 file. You cannot specify both audio and video for a slide. |
|
|
Optional |
Use to pass a password to the target URL
for Basic Authentication. Combined with |
|
|
Optional |
Use to pass a user name to the target URL
for Basic Authentication. Combined with |
|
|
Optional |
Duration in seconds that the slide is played. If you do not specify a duration, the slide plays for the duration of the audio clip associated with the slide. |
|
|
Optional |
0 |
Bottom margin of the slide. |
|
Optional |
0 |
Left margin of the slide. |
|
Optional |
0 |
Right margin of the slide |
|
Optional |
0 |
Top margin of the slide |
|
Optional |
Notes used for the slide. Notes are displayed
only if the showNotes attribute of the |
|
|
Optional |
Presenter of the slide. A slide can have
only one presenter. This name must match one of the presenter names
in the |
|
|
Optional |
1.0 |
Scale used for the HTML content in the slide presentation. If you do not specify the scale, ColdFusion automatically scales the content to fit in the slide. |
|
Optional |
All slides |
Specifies the slide numbers required to
export when the
|
|
Optional |
HTML, SWF, or PPT source files used as a slide. You can specify the following as the slide source:
SWF files must be present on the system running ColdFusion and the path must be either an absolute path or a path relative to the CFM page. If you do not specify a source file, include HTML/CFML code as the body. If you specify a source file and HTML /CFML, ColdFusion ignores the source file and displays the HTML/CFML content in the slide. |
|
|
Optional |
Title of the slide |
|
|
Optional |
ColdFusion |
Text to put in the HTTP User-Agent request header field. Identifies the request client software. |
|
Optional |
true |
Boolean value to switch between OpenOffice
and POI libraries:
|
|
Optional |
Video file used for the presenter of the slide. If you specify video for the slide and an image for the presenter, the video is used instead of the image for the slide. You cannot specify both audio and video for a slide. The video must be an FLV or SWF file. The video file pathname must be relative to the CFM page or the web root. |
Use the cfpresentationslide tag
within the cfpresentation tag to create a slide
presentation from individual SWF or HTML source files. If you do
not specify a source file, include the HMTL or CFML code for the
body of the slide within the cfpresentationslide tag.
You can assign one presenter to each slide. Use the cfpresenter tag to define
presenters referenced by the cfpresentationslide tags.
The following code shows how to create a slide presentation from existing SWF files:
<!--- The following example shows how to create a slide presentation --->
<!--- from individual SWF files located on the ColdFusion server. --->
<!--- Because no directory is specified, the presentation runs in --->
<!--- the browser. --->
<cfpresentation title="myPresentation">
<cfpresentationslide title="1st slide" src="slide1.swf" duration="10"/>
<cfpresentationslide title="2nd slide" src="slide2.swf"
audio="audio1.mp3" duration="20"/>
<cfpresentationslide title="3rd slide" src="slide3.swf"
audio="audio2.mp3" duration="218"/>
</cfpresentation>
cfpresentationslide tag
requires an end tag. If you specify a source file as the content
for the slide instead of CFML and HTML code within start and end
tags, use the end slash as a shortcut for the end tag.You can reference source files from a URL as long as they return HTML content. The following code shows how to create a slide presentation from HTML files located on an external website:
<!--- The following example shows how to create a slide presentation --->
<!--- from HTML files located on an external site. --->
<cfpresentation title="USGS Naming Conventions" directory="myPresenation">
<cfpresenter name="Robert L. Payne" title="Executive Secretary">
<cfpresenter name="Trent Palmer" title="Executive Secretary Foreign Names">
</cfpresentationslide>
<cfpresentationslide src="http://geonames.usgs.gov/index.html"
duration="10" presenter="Robert L. Payne"/>
<cfpresentationslide src="http://geonames.usgs.gov/domestic/index.html"
duration="15" presenter="Robert L. Payne"/>
<cfpresentationslide src="http://geonames.usgs.gov/foreign/index.html"
duration="15" presenter="Trent Palmer"/>
</cfpresentation>
Also, you can enter HTML and CFML code as the body for a slide. Within the code, you can include charts, graphs, and images, as the following code shows:
<!--- This example shows how to create a slide presentation dynamically --->
<!--- from HTML code and CFML code. Because no directory is specified, --->
<!--- the presenation runs in the client browser. --->
<cfpresentation title="Sales Presentation">
<cfpresenter name="Shyam" title="Vice President" email="shyam@somecompany.com">
<cfpresenter name="Ram" title="Sr. Vice President" email="ram@somecompany.com">
<cfpresentationslide title="Introduction" presenter="Shyam" audio="myAudio3.mp3"
duration="10">
<h3>Introduction</h3>
<table>
<tr>
<td>
<ul>
<li>Overview</li>
<li>Q1 Sales Figures</li>
<li>Projected Sales</li>
<li>Competition</li>
<li>Advantages</li>
<li>Long Term Growth</li>
</ul>
</td>
<td><img src="../cfdocs/images/artgallery/paul01.jpg"/></td>
</tr>
</table>
</cfpresentationslide>
<cfpresentationslide Title="Q1 Sales Figures" duration="14" presenter="Ram"
audio="myAudio1.mp3">
<h3>Q1 Sales Figures</h3>
<cfchart format="png" showborder="yes" chartheight="250" chartwidth="300"
pieslicestyle="sliced">
<cfchartseries type="pie">
<cfchartdata item="Europe" value="9">
<cfchartdata item="Asia" value="20">
<cfchartdata item="North America" value="50">
<cfchartdata item="South America" value="21">
</cfchartseries>
</cfchart>
</cfpresentationslide>
</cfpresentation>
<!--- The following example shows how to create a slide presentation --->
<!--- dynamically from HTML in ColdFusion and from HTML files located --->
<!--- on an external site. ColdFusion writes the presentation files --->
<!--- to a directory relative to the CFM page. --->
<cfpresentation title="USGS Naming Conventions" directory="namingConventions">
<cfpresenter name="Robert L. Payne" title="Executive Secretary">
<cfpresenter name="Trent Palmer" title="Executive Secretary Foreign Names">
<cfpresentationslide presenter="Robert L. Payne">
<h3>USGS Naming Conventions</h3>
<ul>
<li>Overview</li>
<li>General Naming Conventions</li>
<li>Domestic Naming Conventions</li>
<li>Foreign Naming Conventions</li>
</ul>
<p></p>
</cfpresentationslide>
duration="10" presenter="Robert L. Payne"/>
<cfpresentationslide src="http://geonames.usgs.gov/domestic/index.html"
duration="15" presenter="Robert L. Payne"/>
<cfpresentationslide src="http://geonames.usgs.gov/foreign/index.html"
duration="15" presenter="Trent Palmer"/>
</cfpresentation>