Skip to main content
Inspiring
May 4, 2009
Question

Regarding custom tags

  • May 4, 2009
  • 2 replies
  • 1180 views

Hi ,

I have one question on custom tag.How the server knows whether it is custom tag or not?

Advance Thanks,

Chandra kaladhar

This topic has been closed for replies.

2 replies

davidsimms
Inspiring
May 5, 2009

CF "knows" it's a custom tag because you'll prefix "CF_" to the tag name when you call it. See http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00001071.htm for full details.

Inspiring
May 4, 2009

Hi, Chandra,

The two most common ways ColdFusion "knows" if a CFML file is a custom tag:

1. It's in the same directory as the CFML file calling it.

2. It's stored in the global "custom tags" directory. The location of this varies based on how and onto what OS you've installed CF. On my Mac, I installed CF 8 with the multi-server configuration option, running on JRun4. So, for me, it's in /Applications/JRun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/CustomTags. On my PC development machine, which has CF 8 installed and integrated with IIS, it's in E:\ColdFusion8\CustomTags

Hope that helps.

Inspiring
May 4, 2009

Thanks craigkaminsky,

Internally how coldfusion application server knows if it is custom tag or not.Is there any execution process is there.

Thanks,

Inspiring
May 4, 2009

Sorry! If you build a custom tag and place it in a file called "mycustomtag.cfm" and then call that file as so:

<cf_mycustomtag ...params />

ColdFusion will check for a file named "mycustomtag.cfm" in the locations I mentioned before. As you go further down the road with custom tags, you can look into using cfimport and some other methods of accessing and executing your tags. But for now, this should get you started.

Here's a link to the CF LiveDocs on creating and using custom tags:

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=reuseCode_1.html