[TYPO3-mvc] View Helper for including JS/CSS

Sebastian KurfŸürst sebastian at typo3.org
Mon Jun 15 08:21:08 CEST 2009


Hi Steffen,



> Adding CData start and end, into the template File, view Helpers within 
> are not executed anymore, the CData Tags are stripped in output there 
> only lasts /* */.
Yep :-) To quote wikipedia: "In an XML document or external parsed 
entity, a CDATA section is a section of element content that is marked 
for the parser to interpret as only character data, not markup."

Thus, Fluid ignores the CDATA parts and just outputs them.
However, we definitely need a <f:cdata> tag which will output cdata tags 
in final output I think. Comments?


> So I think we need View Helpers for inline Code...
This would be helpful as well.

> f:script.js and f:script:css
is CSS a script? I don't like the naming too much currently.
What about <f:include.js> ?


> What do you think about this? How are view Helpers "chained". Meaning: 
> what happens to the output of a f:script ViewHelper on the Main level?
What do you mean? :-)

> If I do so? What would be right way? Building f:script abstract, and 
> afterwards implementing "the specials" in derived classes for js and css?
I would not use f:script then, but 
Tx_Fluid_ViewHelpers_Script_AbstractScriptViewHelper as the abstract 
base class.


Greets,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list