<CFMODULE> Tag - ColdFusion


>> Return to ColdFusion Tag Index

The <CFMODULE> tag allows you ...



  <CFMODULE> Comments from Macromedia LiveDocsLiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb4.htm
Don't forget that the conditional "ThisTag.ExecutionMode" goes around the code in your custom tag. Not on the page you're using cfmodule! Maybe I'm the only one who made that mistake? ;)

LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb4.htm
Actually, it doesn't QUITE run twice: It runs once when ThisTag.ExecutionMode is "start" and once when ThisTag.ExecutionMode is "end".

This is handy if you want to nest tags and have something happen when the opening tag is hit, and something helse happen when the closing tag is hit.

If you want to suppress the double-run, wrap your code in something like <CFIF thistag.executionmode="start"> .. your code .. </cfif>
and then it will only run once.

LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb4.htm
what anclarke said is true for any custom tag.

LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb4.htm
If you put a trailing slash at the end of your cfmodule call, a la <cfmodule template="zyz.cfm" />, the template will be run twice. If you take away the / at the end, it will only be run once. This is with MX 6.1 on Windows.



[Top]


Recommended Books

[Top]

Web Sites

[Top]

Copyright © 2003- 2008, Orville Paul Chomer, All Rights Reserved