[TYPO3-core] RFC: Feature #6635: Allow dynamic values in TCAdefaults

Benjamin Mack benni at typo3.org
Fri Jun 27 18:03:39 CEST 2008


Hey christian,

can you write an updated patch for trunk (as response to the initial 
post) with what the patch does?

Then we can follow the issue, test and review your work.

Thanks a lot!



Christian Trabold wrote:
> This is an SVN patch request.
> 
> Type: New feature / Code cleanup
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=6635
> 
> Branches:
> trunk
> 
> Problem:
> At the moment only static values can be set via TCAdefaults.
> 
> Dynamic values can only be set via $TCA[...]['config]['default'] but 
> sometimes you'd like to set different default values for different page 
> branches.
> 
> Thus it would be nice to use TCAdefaults to get dynamic values depending 
> on the page branches.
> 
> 
> Solution:
> Alter the method "fetchRecord" in "class.t3lib_transferdata.php" so the 
> userFunc-Call can be processed (see attached Patch for details).
> 
> 
> Notes:
> The patch also cleanes up the code a bit. Both TCAdefault-arrays of 
> User- and Page-TSconfig are merged by 
> t3lib_div::array_merge_recursive_overrule() before processing the array 
> in foreach.
> 
> Also some variables are renamed and "$TSconfig" is introduced.
> 
> I hope you'll find this feature useful too.
> 
> 
> Greetings
> 
> Christian

-- 
greetings,
benni.
-SDG-


More information about the TYPO3-team-core mailing list