[TYPO3-mvc] FLUID and JavaScript = total mess

Robert Böttner lists at boettner.it
Tue Feb 23 15:53:56 CET 2010


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(); 
	}
}

masking JS code like this:


	<ns:null>
		<script type="text/javascript">
			...
		</script>
	</ns:null>

sometimes not very clean because depending on the nesting of brackets and linebreaks this can end up in some sequences of <ns:null> ... </ns:null> but you are able to keep the Fluid parser out of your JS that way.

Robert.

Am 23.02.2010 um 15:08 schrieb Franz Koch:

> Hi,
> 
> does anybody have a good solution for creating inlineJS with FLUID? I need inlineJS to create a googleMap, a viewHelper doesn't work here properly and FLUID is parsing the JS object syntax as array and throwing errors :/
> -- 
> 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