[TYPO3-mvc] render Partial from other extension

Bastian Waidelich bastian at typo3.org
Thu Mar 21 20:11:19 CET 2013


Philipp wrote:

Hi Philipp,

> Whats really bad in Fluid is placing javascript code. Sometimes you
> simply CANT write all your code in separat JS files, sometimes you need
> to just write down an object for the use in javascript. And when it
> comes to a {} your code looks like CDATA CDATA CDATA CDATA....

I agree (partly) mixing JavaScript with Fluid is somewhat cumbersome.
The fix Andreas mentioned already improves the situation, but with 
extensive JavaScripts you might still run into issues.

*BUT:* don't put your JavaScript your HTML. Just don't.
I'm convinced that in a couple of years from now people will consider it 
as bad as writing "<p style="background: red; ...>" in your HTML.

Load your scripts at the end of the body section and enhance the HTML 
progressively. It is usually not (much) more work and if you need custom 
values coming from Fluid, set data attributes on container elements.

Just saying ;)


-- 
Bastian Waidelich
--
Core Developer Team

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-typo3v4mvc mailing list