[cgiapp] Turning off Template output for AJAX

fREW Schmidt frioux at gmail.com
Thu Jan 29 14:07:14 EST 2009


On Thu, Jan 29, 2009 at 10:06 AM, kropotkin <enquiries at mms-oxford.com>wrote:

>
> lol
>
> Alright. I take the point that it is consistent design wise - but I am
> outputting JSON so a template isn't really necessary in this case.
>
> But does the C:A JSON plugin require me to be using a template?
>
> Thanks
>
> Kropotkin
>
>
http://code.google.com/p/ptome/source/browse/trunk/modules/TOME.pm#3170

You've probably come to a decision by now on what to do with this one, but I
just figured I'd throw in my two cents about how we did it on a project I
had a while back.

Basically we've got the above template code which does basically what you'd
expect, and if you set it to the plain directive it doesn't actually add any
output at all to the response.  It does have an includes block, but that's
because we still used a little bit of TT for our AJAX.  Nowadays since I use
JSON I'd probably just have it have nothing for the header.

That may or may not help :-)

-- 
-fREW
http://blog.afoolishmanifesto.com


More information about the cgiapp mailing list