-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> > Is there an equivalent to a custom tag's
> > "ThisTag.GeneratedContent" variable for the base executing page?
>
> To the best of my knowledge, there is no way to retrieve this
> generated content from within the scope of the request itself.
Answer Found! Sort of....
I found a bit of a kludge that accomplishes what I need with a minor
amount of hacking... Vis:
My basic goal here was to run a custom tag over the entire contents
of a page request. I was hoping to do something like:
OnRequestEnd.cfm:
=================
<!--- This doesn't work... --->
<cfset Content = ThisPage.GeneratedContent>
<Cfset ThisPage.GeneratedContent = "">
<cf_GZipPage>#Content#</cf_GZipPage>
Here's what I did find:
In the Application.cfm, I put this code:
<CF_GZipPage>
<Cfinclude template="/RootMapping#CGI.Script_Name#">
<cfinclude template="OnRequestEnd.cfm">
</CF_GZipPage>
<cfabort>
Note that you could omit the OnRequestEnd line if you don't use that
file OR you could put it into a try block if you're not sure they'll
be an OnRequestEnd like:
<cftry><cfinclude template="OnRequestEnd.cfm"><cfcatch
type="MissingInclude"></cfcatch></cftry>
Also note that the above, if dropped at the end of your
application.cfm would ignore any & all output that was actually
generated by your app.cfm. That's what I wanted in my case. If
you're outputting stuff in your app.cfm that you need, then you
should do something like:
<CF_GZipPage>
<!--- All your app.cfm stuff here. --->
<Cfinclude template="/RootMapping#CGI.Script_Name#">
<cfinclude template="OnRequestEnd.cfm">
</CF_GZipPage>
<cfabort>
This whole thread of course links into the compression of HTML output
thread elsewhere in this list. I've managed to setup a little tag
that GZIP's all of our page content for browsers that can handle GZIP
encoding. We get anywhere from 2 to 10 times compression, and our
customers are already commenting on the speed increase. The system's
processors are of course working a little harder now, but that means
they're floating at 10% instead of at 4%. Whoopee!
Best regards,
Zac Bedell
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
Comment: Please use PGP!
iQA/AwUBOkObMKvhLS1aWPxeEQIXSQCcD5tqlYkGzgrNN4EGvMxBZBDG1zIAoMHy
nq2e9OSwdbZsF41TNdEhJmDS
=ZZbS
-----END PGP SIGNATURE-----
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists