Developing ColdFusion Applications
|
|
Reusing Code
|
Ways to Reuse Code
ColdFusion provides several different ways to reuse code. These ways include the following techniques:
- If you are using ColdFusion Studio, you can write code snippets, which you can copy into pages.
- You use the
cfinclude
tag to include a ColdFusion page in another page. Included pages behave just as though you typed the included code directly into the calling page.
- You can create custom CFML tags. Unlike included pages, these custom tags act as other tags do. You pass parameters to the custom tags from the calling page and the custom tag pages have their own local Variables scope.
The following sections describe these techniques in more detail.
Copyright © 2001, Macromedia Inc. All rights reserved. |
|