On Fri, 2002-10-25 at 19:19, Randal L. Schwartz wrote: > >>>>> "Pablo" == Pablo Velasquez <[EMAIL PROTECTED]> writes: > > Pablo> Thanks for the reply. Yes, I've found that if I want an image I > Pablo> need the content-type to be image. And it does work, but my > Pablo> main problem is that I want to use both in the same document. > > You'll need to have *two* hits to your template then. I show a > working strategy at > <http://www.stonehenge.com/merlyn/WebTechniques/col60.html>.
You could use the redirect(file) filter [1] to divert the GD output into a temporary file. You can then return the url of that file in your html which might save the second hit on the template. There's possibly a security issue around having a web visible directory writable by the apache user but it may be an acceptable risk. A cron job should take care of deleting expired images. HTH, Simon. [1] http://www.template-toolkit.org/docs/aqua/Manual/Filters.html#redirect_file_ _______________________________________________ templates mailing list [EMAIL PROTECTED] http://www.template-toolkit.org/mailman/listinfo/templates
