[Flow] How would I write a JavaScript ViewHelper

Christian Loock chl at vkf-renzel.de
Tue Jul 29 12:36:56 CEST 2014


Hi,

i looked into the render ViewHelper of fluid, since this is the one that 
comes nearest to what i tried to achieve. However, it seems like 
sections have some extra logic tied in the View Class to work. For now I 
dropped this case, instead i introduces requirejs in my project to 
manage javascript dependencies. I would still like to know if there is 
some clean way to achieve this sort of feature.

Cheers


On 29.07.2014 11:44, Rémy DANIEL wrote:
> Hi Christian
>
> Did you find some ideas about this?
>
> Regards
>
> --
> Rémy
>
>
> 2014-07-21 9:39 GMT+02:00 Christian Loock <chl at vkf-renzel.de>:
>
>> Hello,
>>
>> I want to write a simple Wrapper ViewHelper for Javascript inside my
>> Templates.
>>
>> The Idea is to have a ViewHelper that acts like a section, that is then
>> rendered inside the Header of my Layout. You now might ask yourself, why
>> not just declare a section? The problem is, that I want to be able to add
>> JavaScript to my header, inside my custom ViewHelpers. Sections that I
>> define in the ViewHelper, dont seem to be passed to the layout. Also, I am
>> not sure what happens if I have multiple instances of the same sections. Is
>> there some way to add Variables to the Layout from within my ViewHelpers?
>>
>> Cheers,
>>
>> --
>> Christian Loock
>> Web Developer
>> Renzel Agentur
>> www.renzel-agentur.de
>>
>> _______________________________________________
>> Flow mailing list
>> Flow at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow

-- 
Christian Loock
Web Developer
Renzel Agentur
www.renzel-agentur.de



More information about the Flow mailing list