[TYPO3-mvc] Best Practice? Passing Values to JavaScript within a Template
Bastian Waidelich
bastian at typo3.org
Tue Apr 26 09:33:41 CEST 2011
Tim Schoch | GSTALTIG wrote:
Hi Tim,
> I'd like to pass some values from the controller to the javascript files [...]
Maybe this helps you:
<http://forge.typo3.org/projects/typo3v4-mvc/wiki/FAQ#How-can-I-use-JavaScript-inside-Fluid-templates>
> And how about Caching?
You should put all "static" scripts into js files, so they can be
cached. Dynamic parts (like the name of your visitor) can't be cached of
course so you might want to insert them already before the extbase
output (e.g. via an TS USER_INT object) so that your extbase plugin
still can be cached.. Or you load the custom data via AJAX.
Best,
Bastian
More information about the TYPO3-project-typo3v4mvc
mailing list