Ok,
danke mal für den Hinweis. Ich habe jetzt schon einige Zeit rumgetan und auch mit dem IRRE Tutorial versucht aber ich bekomme die m:n Relation einfach nicht richtig hin.
Ich kann bei einem Team eine neue Relation anlegen und eine Person zuweisen (allerdings könnte ich auch ein anderes Team zuweisen), sieht also folgendermaßen aus:
Bild: zappzarapp.at/mn_relation.jpg
Die Relationen werden richtig angelegt, wenn ich den Datensatz jedoch speichere und wieder einsteige bekomme ich keine Relationen angezeigt.
Ich habe nur eine ganze einfache Extension erstellt ohne irgendwelche Zusatzfelder. Also wirklich nur Name der Person, Name des Team und die Relation. Hier meine tca.php, meiner Meinung nach habe ich alles genauso wie im IRRE Tutorial oder in dem von dir verlinken Beispiel gemacht, vielleicht kennt sich ja jemand damit aus und findet schnell meinen Fehler?
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
$TCA['tx_team_teams'] = array (
'ctrl' => $TCA['tx_team_teams']['ctrl'],
'interface' => array (
'showRecordFieldList' => 'name'
),
'feInterface' => $TCA['tx_team_teams']['feInterface'],
'columns' => array (
'name' => array (
'exclude' => 0,
'label' => 'LLL:EXT:team/locallang_db.xml:tx_team_teams.name',
'config' => array (
'type' => 'input',
'size' => '30',
)
),
'persons' => Array(
'label' => 'Persons',
'config' => Array(
'type' => 'inline',
'foreign_table' => 'tx_team_persons_teams',
'foreign_field' => 'persons',
'foreign_label' => 'teams',
),
),
),
'types' => array (
'0' => array('showitem' => 'name;;;;1-1-1,persons;;;;3-3-3')
),
'palettes' => array (
'1' => array('showitem' => '')
)
);
$TCA['tx_team_persons'] = array (
'ctrl' => $TCA['tx_team_persons']['ctrl'],
'interface' => array (
'showRecordFieldList' => 'name'
),
'feInterface' => $TCA['tx_team_persons']['feInterface'],
'columns' => array (
'name' => array (
'exclude' => 0,
'label' => 'LLL:EXT:team/locallang_db.xml:tx_team_persons.name',
'config' => array (
'type' => 'input',
'size' => '30',
)
),
'teams' => Array(
'label' => 'Teams',
'config' => Array(
'type' => 'inline',
'foreign_table' => 'tx_team_persons_teams',
'foreign_field' => 'teams',
'foreign_label' => 'persons',
),
),
),
'types' => array (
'0' => array('showitem' => 'name;;;;1-1-1,teams')
),
'palettes' => array (
'1' => array('showitem' => '')
)
);
$TCA['tx_team_persons_teams'] = array (
'ctrl' => $TCA['tx_team_persons_teams']['ctrl'],
'interface' => array (
'showRecordFieldList' => 'person,team,function'
),
'feInterface' => $TCA['tx_team_persons_teams']['feInterface'],
'columns' => array (
'person' => array (
'exclude' => 0,
'label' => 'LLL:EXT:team/locallang_db.xml:tx_team_persons_teams.person',
'config' => array (
'type' => 'select',
'foreign_table' => 'tx_team_persons',
'maxitems' => 1,
)
),
'team' => array (
'exclude' => 0,
'label' => 'LLL:EXT:team/locallang_db.xml:tx_team_persons_teams.team',
'config' => array (
'type' => 'select',
'foreign_table' => 'tx_team_teams',
'maxitems' => 1,
)
),
'function' => array (
'exclude' => 0,
'label' => 'LLL:EXT:team/locallang_db.xml:tx_team_persons_teams.function',
'config' => array (
'type' => 'input',
'size' => '30',
)
),
),
'types' => array (
'0' => array('showitem' => 'person;;;;1-1-1, team, function')
),
'palettes' => array (
'1' => array('showitem' => '')
)
);
?>
lg Matthias