[TYPO3-dev] Alter foreign_table_where to select items from parent page
Brian Bendtsen
nightowl at galnet.dk
Thu Apr 26 11:32:48 CEST 2007
Mathias Schreiber [TYPO3] skrev:
> This is, what I do:
> function user_getTCAFields($params) {
> // Get XML from Flexform and transform it to a PHP array
> $flexData = t3lib_div::xml2array($params['row']['pi_flexform']);
> // Extract Tablenabe
> $table = $flexData['data']['sDEF']['lDEF']['tcatable']['vDEF'];
> // Load the TCA for the Selected Table
> $localTCA = t3lib_div::loadTCA($table);
> $i = 1;
> foreach ($GLOBALS['TCA'][$table]['columns'] as $key => $value) {
> if (!t3lib_div::inList($this->blackList,$key)) {
> $params['items'][$i] = array(
> '0' => $key,
> '1' => $key
> );
> $i++;
> }
> }
> return $params['items'];
> }
>
> Good thing to know:
> I append to the $params['items'] array since some values are defined
> in TCA prior to the method call.
Hi
I have now spend so much time on this that I cant "afford" to spend any
more right now. So I will just place all items on one page, its not
pretty and the users will not like it, but it works.
I will try to find a better solution when I have a better understanding
of php and TYPO3.
I appreciate your help!
/BB
More information about the TYPO3-dev
mailing list