[TYPO3-mvc] Fluid for old extensions
Stefan Frömken
firma at sfroemken.de
Tue Nov 8 09:24:24 CET 2011
Am 03.11.2011 14:47, schrieb Stefan Neufeind:
> On 11/03/2011 02:45 PM, Sven Kalbhenn wrote:
>> Hi folks,
>>
>> I'm experimenting with the new FLUIDTEMPLATE-stuff at the moment and really like it a lot!
>>
>> But - this might be a stupid question - how can I use Fluid-Templates with the "old" pi-extensions?
>> Is there a way, to replace the "old" template-parser with the FLUIDTEMPLATE-Parser for extensions as well??
>>
>> For example:
>> Instead of:<h1>###TITLE###</h1>
>> something like:<h1> {TITLE}</h1>
>>
>> In extension-templates the benefits from the FLUID-functionality would be much greater, than in the page-templates!
>> So, is this possible???
>
> Hi,
>
> yes, you can even use FLUID without Extbase. The initialisation in your
> extension needs to be done by hand but it's doable. For example see:
>
> http://talks.speedpartner.de/talks/2011-01-08/TYPO3UG_NRW_2011_01_Extbase_Fluid.pdf
> (code on slide 12)
>
>
> Kind regards,
> Stefan
I think it's better to try it like in class.tslib_content_fluidtemplate.php
So you have ONE central object and you don't have to instanciate 3 new
Objects.
Further you can do something like that:
$conf['myConfigForFluid'] = 'Have a look to TSref';
$conf['variables.']['name'] = 'Stefan';
$content = $this->cObj->FLUIDTEMPLATE($conf);
Stefan
More information about the TYPO3-project-typo3v4mvc
mailing list