[TYPO3-dev] XML Export with Fluid

Bastian Waidelich bastian at typo3.org
Fri Feb 24 10:22:18 CET 2012


Georg Ringer wrote:

Hi Georg,

>> Probably the easiest solution would be to clean up the output before
>> saving it to the cache / file system (for example with html tidy [1]).
>
> true. is there a way to hook into the render() function for kind of
> postprocess?

Not yet, but we're planning to add some signals. That would also make it 
easier to do performance tests.
For now I'd try using the "[FE][tidy]" configuration of TYPO3 or use one 
of the existing cleanup extensions.
Obviously this only works in some cases. If you output the rendered 
result to the browser directly, you can post process is "manually".

>> If you want to use Fluid for that you should have a look at the so
>> called *interceptors* (see [2]).
>
> i checked that out but does this really help? as all the tabs and spaces
> are no objects or something like that? what of those should be used then?

I just gave it a shot and it seems to work: 
https://gist.github.com/1899672 (of course, this example is very dump 
and does not check for tags etc).

NOTE: Interceptors are not (yet) part of the Public API [1]!

Best
Bastian


[1] http://forge.typo3.org/projects/typo3v4-mvc/wiki/Public_API



More information about the TYPO3-dev mailing list