Zum Inhalt springen

Extension using IRRE for tt_content Elements

Erstellt am 16. Januar 2014 · 2 Antworten · letzte Antwort am 17. Januar 2014

Tags: TCA, Inhaltselemente, TYPO3 6.x, Frage

freund ·

Hallo,
ich suche nach einer Möglichkeit eine extension zu programmieren die es mir ermöglicht verschiedene content elemente aus tt_content via IRRE zu einem tab hinzuzufügen. Hierzu habe ich im extension builder zwei model objekte mit einer 1:n relation geschaffen:
- Webshowtab mit einem titel und einer relation content
- Content ohne eigene properties aber mit map to existing table tt_content.

Das sieht soweit auch alles ganz richtig aus und das mapping auf tt_content wird übernommen. Das webshowtab field im tt_content wird angelegt und ich habe im backend beim anlegen eines webshowtabs die Möglichkeit ein neues content Element zu erstellen. Beim ausklappen des Elements wird jedoch nichts angezeigt. Die Typoversion ist Typo3 6.1.5.

Aus dem webshowtab TCA:

'content' => array(
		'exclude' => 0,
		'label' => 'LLL:EXT:webshowtabs/Resources/Private/Language/locallang_db.xlf:tx_webshowtabs_domain_model_webshowtab.content',
		'config' => array(
			'type' => 'inline',
			'foreign_table' => 'tt_content',
			'foreign_field' => 'webshowtab',
			'foreign_table_where' => 'AND tt_content.sys_language_uid = ###REC_FIELD_sys_language_uid###',
			'foreign_sortby' => 'sorting',
			'maxitems'      => 9999,
			'appearance' => array(
				'collapseAll' => 1,
				'levelLinksPosition' => 'top,bottom',
				'showSynchronizationLink' => 1,
				'showPossibleLocalizationRecords' => 1,
				'showAllLocalizationLink' => 1
			),
		),
)

Hat jemand eine Idee warum nichts angezeigt wird? Das TCA müsste er doch von tt_content übernehmen?!

freund ·

Wenn ich den content nicht aus tt_content hole sondern aus einem weiteren model das ich erstelle funktioniert alles wie es soll. Leider sollen hier aber tt_content Datensätze erstellt werden.

Ich nehme also an das einfach das tt_content TCA nicht geladen werden kann. Ein

t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['columns']['webshowtab']['config']['type'] = 'passthrough';

in der ext_tables.php hat leider auch nichts geändert.

Schweriner ·

Probier mal nur das im TCA und stell sicher, dass es in der tt_content Tabelle auch das Feld webshowtab gibt!

'webshowtab' => array(
            'exclude' => 0,
            'label' => 'Inhalte',
            'config' => array(
                'type' => 'inline',
                'foreign_table' => 'tt_content',
                'foreign_field' => 'webshowtab',
                'maxitems'      => 9999,
                'appearance' => array(
                    'collapse' => 0,
                    'levelLinksPosition' => 'top',
                    'showSynchronizationLink' => 1,
                    'showPossibleLocalizationRecords' => 1,
                    'showAllLocalizationLink' => 1
                ),
            ),
        ),

CREATE TABLE tt_content (
webshowtab int(11) unsigned DEFAULT '0' NOT NULL
);