Hi,
in meiner "Casestudy.php sieht das TCA setting so aus:"
'categories' => array(
'exclude' => 1,
//'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:tancasestudies/Resources/Private/Language/locallang_db.xlf:tx_tancasestudies_domain_model_casestudy.categories',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_tancasestudies_domain_model_category',
'foreign_table_where' => ' AND (tx_tancasestudies_domain_model_category.sys_language_uid = 0 OR tx_tancasestudies_domain_model_category.l10n_parent = 0)',
//'foreign_table_where' => ' AND tx_tancasestudies_domain_model_category.sys_language_uid = 0',
'MM' => 'tx_tancasestudies_casestudy_category_mm',
'MM_opposite_field' => 'categories',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => Array(
'type' => 'script',
'title' => 'Create new',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_tancasestudies_domain_model_category',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
),
),
),
in meiner Category.php sieht das TCA so aus:
'casestudies' => array(
'exclude' => 1,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:tancasestudies/Resources/Private/Language/locallang_db.xlf:tx_tancasestudies_domain_model_category.casestudies',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_tancasestudies_domain_model_casestudy',
'foreign_table_where' => 'AND tx_tancasestudies_domain_model_casestudy.sys_language_uid = 0',
'MM' => 'tx_tancasestudies_casestudy_category_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => Array(
'type' => 'script',
'title' => 'Create new',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_tancasestudies_domain_model_casestudy',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
),
),
),
ext_tabels.sql sieht so aus:
#
# Table structure for table 'tx_tancasestudies_domain_model_casestudy'
#
CREATE TABLE tx_tancasestudies_domain_model_casestudy (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
images int(11) unsigned DEFAULT '0',
description text NOT NULL,
galleryimages int(11) unsigned DEFAULT '0',
contactpersons int(11) unsigned DEFAULT '0' NOT NULL,
categories int(11) unsigned DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob,
PRIMARY KEY (uid),
KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
KEY language (l10n_parent,sys_language_uid)
);
#
# Table structure for table 'tx_tancasestudies_domain_model_category'
#
CREATE TABLE tx_tancasestudies_domain_model_category (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
parentcategory varchar(255) DEFAULT '' NOT NULL,
products int(11) unsigned DEFAULT '0' NOT NULL,
casestudies int(11) unsigned DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob,
PRIMARY KEY (uid),
KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
KEY language (l10n_parent,sys_language_uid)
);
#
# Table structure for table 'tx_tancasestudies_casestudy_category_mm'
#
CREATE TABLE tx_tancasestudies_casestudy_category_mm (
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
TCA Doku in diesem Punkt habe ich noch nicht gelesen bzw. diesen Punkt noch nicht gefunden.
Habe mal danach gegoogelt aber noch nichts gefunden.
Hast du einen Tipp für mich oder einen Link?
Danke für deine Antwort