[TYPO3-mvc] Open Job: Create a helper method for using legacy TypoScript in Fluid templates

Sebastian KurfŸürst sebastian at typo3.org
Sat Jun 6 08:41:53 CEST 2009


Hi everybody,

You already tried Extbase/Fluid and got hooked by the ideas? You want to 
help out, but don't know if you can? Be assured, you can! We'll post 
some jobs which you can take, and this is the second one.

Category: Not much stuff to do, but solves a major show stopper.

Problem:
All TypoScript settings are made available under $this->settings inside 
the Controller, and as well as {settings} inside the template. To be 
more close to FLOW3 and because the "." (dot) is the separator in Object 
Accessors, we needed to strip the trailing "." in TypoScript 
configuration away.
Thus, when one writes the TypoScript:
10 = TEXT
10.value = Hello
then, in classical TYPO3 v4, this gets converted to the following array:
array(
	'10' => 'TEXT'
	'10.' => array(
		'value' => 'Hallo'
	)
)
However, Extbase converts it to the following (because of the above reasons)
array(
	'10' => array(
		'value' => 'Hallo',
		'_typoscriptNodeValue' => 'TEXT'
)
So, what happens is that the value of the actual TypoScript node is 
pushed down into its substructure.
This works really well, and solves most cases, but imagine the following 
case:
Inside your ViewHelper, you expect a configuration for a cObject which 
you'll render using the classical tslib_cObj. Thus, you'll need the 
"classical" TYPO3 v4 syntax (with trailing dot), but Extbase only 
provides you the 2nd syntax with _typoscriptNodeValue.

Bugtracker reference: http://forge.typo3.org/issues/show/3293

Job description:
Write a helper method you can call inside your custom ViewHelper which 
converts the "Extbase" TypoScript to "classical" TypoScript by 
re-introducing the "." where needed and remove the _typoscriptNodeValue.
Test it with unit tests.
I propose that the class should be called Tx_Extbase_Utility_TypoScript.

Reward:
We'll review your code and give you constructive feedback, and this 
feature is an essential building block on the integration of 
Extbase/Fluid in TYPO3 v4.

I'd also be very happy if somebody was interested to take over this job 
:-) That really helps a lot.

Greets from Dresden,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list