user160820
user160820

Reputation: 15200

coldfusion cfinclude before and after callbacks

Is there any possibility to call some callback function for Debugging purpose before and after the cfinclude tag.

for example if i have

<cfinclude template="xyz.cfm" />

and is Logging is enabled, I would like to call abefoeInclude and afterInclude callbacks.

Is there a possibility to achive this?

Upvotes: 0

Views: 138

Answers (2)

baynezy
baynezy

Reputation: 7036

You can create your own version of cfinclude as a custom tag http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=reuseCode_2.html

Inside that you can check if debugging is turned on using isDebugMode() and do your logging in side the custom tag. Then you can use the custom tag instead of cfinclude.

I hope that makes sense.

Upvotes: 1

David Faber
David Faber

Reputation: 12486

Do you mean whether debugging is enabled? You use the ColdFusion function isDebugMode().

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7bf4.html

Upvotes: 0

Related Questions