Use one cfpresentationslide tag for each slide in the presentation. The presentation runs the slides in the order they are listed beneath the cfpresentation tag. You can create content for a slide in one of the following ways:
Source |
Description |
Example |
---|---|---|
A SWF or HTML file |
The file must be located on the system running ColdFusion. You can specify an absolute path or a path relative to the ColdFusion page. |
<cfpresentationslide title="slide 1" src="presentation/slide1.swf"/><cfpresentationslide title="slide 2" src="c:/presentation/slide2.htm"/> |
A URL |
The URL must return HTML content. |
<cfpresentationslide title="slide 3" src="http://www.worldview.com/index.htm"/> |
HTML and CFML code on the ColdFusion page |
Enclose the HTML and CFML code within the cfpresentationslide start and end tags. |
<cfpresentationslide><h3>Total Sales</h3><cfchart format="jpg" chartwidth="500" show3d="yes"><cfchartseries type="pie" query="artwork" itemcolumn="issold" valuecolumn="price"/></cfchart></cfpresentationslide> |
Creating content from source files
The following code creates a presentation with three slides from source files in different locations:
<cfpresentation title="Garden Mania" directory="gardenPresentation"> |
In this example, ColdFusion generates the files required to run the presentation in the gardenPresentation directory. It generates a new SWF file in the data subdirectory from each of the slides. ColdFusion also copies the hendrix.mp3 file and saves it in the data subdirectory.
Note: Links within slides created from HTML files are not active. |
Creating content from HTML and CFML code
If you do not specify a source file for a slide, create the content by using HTML or CFML in the cfpresentationslide tag body. The following presentation contains one slide with each with the following types of content:
- Generated from HTML
- Generated from HTML and CFML
- Extracted from an HTML file on an external website
<cfpresentation title="The Road Ahead"> |
Note: The value for the format attribute of the cfchart tag must be JPG or PNG. |
The content for slides is not limited to static data: you can generate content from information extracted from a database or a query of queries.