[TYPO3-english] typoscript object merging instead of overwriting
Krystian Szymukowicz
t33k.RE.MO.VE at RE.MO.VE.prolabium.com
Thu Sep 30 19:54:17 CEST 2010
On 2010-09-30 17:58, Sergey Alexandrov wrote:
> Try this
>
> temp.c = COA
> temp.c {
> 10< temp.a
> 20< temp.b
> }
This will not work because I need the values from temp.a and temp.b to
be on the same level in temp.c. And to overwrite each other is they are
the same.
Seems like this is not currently possible in typoscript parser.
Maybe there should be another operator to recursively merge the arrays
of typoscript. Something like:
temp.c << temp.a
temp.c << temp.b
With use of array_merge_recursive_overrule we would get:
temp.c = t3lic_div::array_merge_recursive_overrule(temp.c, temp.a);
temp.c = t3lic_div::array_merge_recursive_overrule(temp.c, temp.b);
--
grtz
Krystian Szymukowicz
More information about the TYPO3-english
mailing list