cfpresentation
Description
Defines the look of a dynamic slide presentation and determines whether to write the presentation files to disk. The cfpresentation tag is the parent tag for one or more cfpresentationslide tags, where you define the content for the presentation, and the cfpresenter tags, which provide information about the people presenting the slides.
Categories
Related
History
ColdFusion
9: Added format and destination attributes.
ColdFusion
8: Added this tag.
Syntax
<cfpresentation
title = "text string"
authPassword = "authentication password"
authUser = "authentication user name"
autoPlay = "yes|no"
backgroundColor = "hexadecimal color|HTML named color"
control = "normal|brief"
controlLocation = "right|left"
destination = "filepath"
directory = "pathname"
format = "ppt|html"
glowColor = "hexadecimal color|HTML named color"
initialTab = "outline|search|notes"
lightColor = "hexadecimal color|HTML named color"
loop = "yes|no"
overwrite = "yes|no"
primaryColor = "hexadecimal color|HTML named color"
proxyHost = "IP address or server name for proxy host"
proxyPassword = "password for the proxy host"
proxyPort = "port of the proxy host"
proxyUser = "user name for the proxy host"
shadowColor = "hexadecimal color|HTML named color"
showNotes = "yes|no"
showOutline = "yes|no"
showSearch = "yes|no"
textColor = "hexadecimal color|HTML named color"
userAgent = "HTTP user agent identifier">
presentation content...
</cfpresentation>
Note: You can
specify this tag’s attributes in an 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.
Attributes
| Attribute | Description | Required | Default |
|---|---|---|---|
| authPassword | Sends a password to the target URL for Basic Authentication. Combined with username to form a base64 encoded string that is passed in the Authenticate header. Does not provide support for Integrated Windows, NTLM, or Kerberos authentication. | Optional | |
| authUser | Sends a user name to the target URL for Basic Authentication. Combined with password to form a base64 encoded string that is passed in the Authenticate header. Does not provide support for Integrated Windows, NTLM, or Kerebos authentication. | Optional | |
| autoPlay | Specifies whether to play the presentation automatically: yes: the presentation automatically runs through the entire presentation at startup. no: the user must click the Play button to start the presentation and click the Next button to advance to the next slide in the presentation. | Optional | yes |
| backgroundColor | Background color of the presentation. The value is hexadecimal: use the form "##xxxxxx" or "##xxxxxxxx", where x = 0–9 or A–F; use two number signs or none. Also, you can use a subset of HTML named colors listed in the section Named colors. | Optional | 727971 |
| control | Presentation control: normal brief | Optional | normal |
| controlLocation | Specifies the location of the presentation control: right left | Optional | right |
| destination | Absolute file name or a file path relative to the CFM page. You can use this for both connect presentation and ppt presentations. Required if format="html". | Optional | |
| directory | Directory where the presentation is saved. This can be an absolute path or a path relative to the CFM page. Also, ColdFusion creates a subdirectory called data that contains: A SWF file for each slide srchdata.xml (which creates the search interface) vconfig.xml viewer.xml images, video clips, and SWF files referenced by the cfpresentationslide tags If you do not specify a directory, ColdFusion writes the files to a temp directory and runs the presentation in the client browser. | Optional | |
| format | Specifies the file format for conversion: ppt converts html input provided in cfpresentationslide to a PowerPoint file. html converts ppt to an HTML presentation. | Optional | |
| glowColor | Color used for glow effects on the buttons. The value is hexadecimal: use the form "##xxxxxx" or "##xxxxxxxx", where x = 0–9 or A–F; use two number signs or none. Also, you can use a subset of HTML named colors listed in the section Named colors. | Optional | 35D334 |
| initialTab | Specifies which tab displays on top when the presentation is run. This applies only when the control value is normal: outline search notes | Optional | outline |
| lightColor | Light color used for light-and-shadow effects. The value is hexadecimal: use the form "##xxxxxx" or "##xxxxxxxx", where x = 0–9 or A–F; use two number signs or none. Also, you can use a subset of HTML named colors listed in the section Named colors. | Optional | 4E5D60 |
| loop | Specifies whether the presentation runs in a loop: yes: the presentation restarts automatically after it ends. no: the user must click the Play button to restart the presentation. | Optional | no |
| overwrite | Specifies whether files in the directory are overwritten. Valid only when the directory attribute is specified. yes: overwrites files if they are already present no: creates new files | Optional | yes |
| primaryColor | Primary color of the presentation. The value is hexadecimal: use the form "##xxxxxx" or "##xxxxxxxx", where x = 0–9 or A–F; use two number signs or none. Also, you can use a subset of HTML named colors listed in the section Named colors. | Optional | 6F8488 |
| proxyHost | Host name or IP address of a proxy server to which to send the request. | Optional | |
| proxyPassword | Password required by the proxy server. | Optional | |
| proxyPort | The port to connect to on the proxy server. | Optional | 80 |
| proxyUser | User name to provide to the proxy server. | Optional | |
| shadowColor | Shadow color used for light-and-shadow effects. The value is hexadecimal: use the form "##xxxxxx" or "##xxxxxxxx", where x = 0–9 or A–F; use two number signs or none. Also, you can use a subset of HTML named colors listed in the section Named colors. | Optional | 000000 |
| showNotes | Specifies whether the Notes tab is present in the presentation control panel: yes no | Optional | no |
| showOutline | Specifies whether the Outline is present in the presentation control panel: yes no | Optional | yes |
| showSearch | Specifies whether the Search tab is present in the presentation control panel: yes no | Optional | yes |
| textColor | Color for all the text in the presentation user interface. The value is hexadecimal: use the form "##xxxxxx" or "##xxxxxxxx", where x = 0–9 or A–F; use two number signs or none. Also, you can use a subset of HTML named colors listed in the section Named colors. | Optional | FFFFFF |
| title | Title of the presentation | Required | |
| userAgent | Text to put in the HTTP User-Agent request header field. Used to identify the request client software. | Optional | ColdFusion |
Usage
Use the cfpresentation tag to create the container for a slide presentation. You can define the position and appearance of the presentation controls, the background color, and the text for the presentation. Also, use this tag to determine whether to write the presentation to files or to run it directly in the client browser.
The settings in the cfpresentation tag do not affect the appearance of the content defined in the cfpresentationslide tags.
The settings in the cfpresentation tag do not affect the appearance of the content defined in the cfpresentationslide tags.
Example
<!--- This example shows how to create a slide presentation from --->
<!--- an HTML file and from HTML code on the CFM page and write --->
<!--- the presentation files to a directory called myPresentation, --->
<!--- which is relative to the CFM page. --->
<cfpresentation title="Sales Presentation" directory="myPresenation">
<cfpresenter name="Shyam" title="Vice President" email="shyam@somecompany.com" image="shyam.jpg">
<cfpresenter name="Ram" title="Sr. Vice President" email="ram@somecompany.com">
<!--- The following code creates a slide from an HTML file --->
<!--- located on the ColdFusion server. --->
<cfpresentationslide src="introduction.htm" title="Introduction" presenter="Shyam"
audio="myAudio.mp3" duration="36"/>
<!--- The following code creates a slide from HTML code in the CFM file. --->
<cfpresentationslide>
<h3>Sales</h3>
<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>
</cfpresentationslide>
<!--- The following code creates a slide from HTML and CFML code. --->
<cfpresentationslide Title="Q1 Sales Figures" duration="14" presenter="Ram"
audio="myAudio2.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>