[TYPO3-core] RFC #16173: Refactor FLUIDTEMPLATE cObject to use the new Fluid standalone view

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Nov 2 10:10:17 CET 2010


Bastian Waidelich schrieb am 02.11.2010 09:14:
> Ernesto Baschny [cron IT] wrote:
> 
> Hi Ernesto,
> 
>> I think these changes don't make sense:
>>
>> ...
>> -if (isset($conf['layoutRootPath']) || isset($conf['layoutRootPath.']))
>> +if (isset($conf['layoutRootPath']))
>>     $layoutRootPath = $this->cObj->stdWrap($conf['layoutRootPath'],
>> $conf['layoutRootPath.']);
>> ...
>>
>> Because that would not catch a setup like for example:
>>
>>    layoutRootPath.value = fileadmin/....
> 
> That's true. I changed it, because
> layoutRootPath.wrap = foo | bar
> 
> would not work for example, as layoutRootPath is resolved implicitly.
> But it probably doesn't really make sense as is.
> 
> The second version of Joeys stdWrap patch (#16198) fixes this.

Seems so! That is indeed the most efficient way of doing it:

+		$partialRootPath = isset($conf['partialRootPath.'])
+			? $this->cObj->stdWrap($conf['partialRootPath'],
$conf['partialRootPath.'])
+			: $conf['partialRootPath'];

Will you incorporate this in your refactoring #16173, making #16198
obsolete? AFAIK Joey wanted to change that from a ternary checking to a
regular if / else, which would also improve readability.

> Still: only setting stdWrap properties on layout/partialRootPath without
> explicitly setting the value won't work - do you think, that's a problem?

You can set a "value" using stdWrap properties, like my example before.
Or something like:

 layoutRootPath.cObject = TEXT
 layoutRootPath.cObject.value = fileadmin/path/

The TypoScript developers usually find it very convenient to be able to
do such strange things, and it would be a shame if we would have to set
a value just to make it work:

 layoutRootPath = dummy
 layoutRootPath.cObject = TEXT
 layoutRootPath.cObject.value = fileadmin/path/

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list