[TYPO3-mvc] FLUID and JavaScript = total mess
dennis ahrens
dennis.ahrens at googlemail.com
Tue Feb 23 18:51:02 CET 2010
Hi,
the "problem" that i'd like to have JS code, that depends on model
data i've solved by writing ViewHelpers, which generate the JS code
itself, and adds it to the page...
I know, that this solution is really arguable :)
In combination with extjs it makes sense - cause you can define new JS
"classes" inside the ViewHelper - which can be used in clean JS files
afterwards.
Don't know if this is really a possible way when working with jQuery.
regards
Dennis
2010/2/23 Franz Koch <typo3.RemoveForMessage at elements-net.de>:
> Hi,
>
>> I helped myself with a NullViewHelper
>>
>> class Tx_MyExtkey_ViewHelpers_NullViewHelper extends
>> Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
>>
>> protected $objectAccessorPostProcessorEnabled = FALSE;
>>
>> /**
>> * Render without processing
>> *
>> *
>> * @return string
>> */
>> public function render() {
>> return $this->renderChildren();
>> }
>> }
>
> IIRC FLUID will still parse the code inside, but simply don't put the return
> value of objects it through htmlspecialchars. So this wouldn't have helped
> in this case.
> If you want FLUID to ignore a junk of code you could wrap it with CDATA, but
> in my case I needed access to template varialbes/objects inside my JS.
>
> --
> kind regards,
> Franz Koch
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
More information about the TYPO3-project-typo3v4mvc
mailing list