Hallo,
ich hab folgenden Code:
<sDEF>
...
<what_to_display>
<tceforms>
<label>LLL:EXT:t_events/locallang_tca.php:t_events.pi_flexform.what_to_display</label>
<config>
<type>select</type>
<items type="array">
<numindex index="0" type="array">
<numindex index="0">TEASER</numindex>
<numindex index="1">TEASER</numindex>
</numindex>
<numindex index="1" type="array">
<numindex index="0">LIST</numindex>
<numindex index="1">LIST</numindex>
</numindex>
</items>
</config>
</tceforms>
</what_to_display>
...
</sDEF>
in der ext_tables.php ganz unten:
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1'] = 'layout,select_key,pages,recursive';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1'] = 'pi_flexform';
t3lib_extMgm::addPiFlexFormValue($_EXTKEY.'_pi1', 'FILE:EXT:'.$_EXTKEY.'/flexform_ds.xml');
if (TYPO3_MODE=='BE') {
include_once(t3lib_extMgm::extPath($_EXTKEY).'class.tx_tevents_listview.php');
}
und meine main function sieht folgendermassen aus:
function main($content, $conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
$this->pi_initPIflexForm();
$this->conf['code'] = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'what_to_display', 'sDEF');
echo("test: ".$this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'what_to_display', 'sDEF')); // no output (just "test")
Leider gibt das echo gar nichts aus...an was koennte das liegen? Vergessen habe ich nichts?
Danke!
1. sicher das der rest der flexform korrekt ist ?
2. was sagt das debug auf $this->cObj->data['pi_flexform'] ?
Sorry für die späte Antwort: Festplattencrash -> Neuschreiben -> gleichen Fehler wieder haben...
Zu deiner Frage: was sagt das debug auf $this->cObj->data['pi_flexform']:
'' (also nix).
Daran wird es wohl liegen? Wie wird diese var gesetzt? Durch
$this->pi_initPIflexForm(); // Initialize the FlexForms array
richtig?
in ext_tables.php steht:
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1'] = 'layout,select_key,pages,recursive';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1'] = 'pi_flexform';
t3lib_extMgm::addPiFlexFormValue($_EXTKEY.'_pi1', 'FILE:EXT:'.$_EXTKEY.'/flexform_ds.xml');
Hat jemand noch eine Idee? Danke!
dieses liest den Wert aus dem DB-Feld pi_flexform des entsprechenden tt_content-Datensatzes aus. Wenn das leer ist, stimmt was nicht.
wird die Flexform angezeigt ?
Die Flexform wird angezeigt.
In tt_content (hab nur einen Eintrag) wird in pi_flexform das entsprechende angezeigt:
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<T3FlexForms>
<data>
<sheet index="sDEF">
<language index="lDEF">
<field index="what_to_display">
<value index="vDEF">TEASER</value>
</field>
...
(mit allen gespeicherten Werten, das habe ich gecheckt).
Was hat es mit Startingpoint und Recursive auf sich? Muss man da was beachten, oder kann man das einfach leer lassen?
Hi, nochmals das ganze (nachdem ich neu programmiert habe):
ext_tables.php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
if (TYPO3_MODE=='BE') {
include_once(t3lib_extMgm::extPath($_EXTKEY).'class.tx_t4events_listview.php');
}
t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1'] = 'layout,select_key,pages,recursive';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1'] = 'pi_flexform';
t3lib_extMgm::addPiFlexFormValue($_EXTKEY.'_pi1', 'FILE:EXT:'.$_EXTKEY.'/flexform_ds.xml');
t3lib_extMgm::addPlugin(array('LLL:EXT:t4_events/locallang_db.xml:tt_content.list_type_pi1', $_EXTKEY.'_pi1'),'list_type');
..
flexform_ds.xml
<T3DataStructure>
<meta>
<langDisable>1</langDisable>
<!-- <langChildren>1</langChildren>!-->
</meta>
<ROOT>
<type>array</type>
<el>
<what_to_display>
<TCEforms>
<label>LLL:EXT:t4_events/locallang_tca.php:t4_events.pi_flexform.what_to_display</label>
<config>
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">TEASER</numIndex>
<numIndex index="1">TEASER</numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">LIST</numIndex>
<numIndex index="1">LIST</numIndex>
</numIndex>
</items>
<size>1</size>
<selectedListStyle>width:150px</selectedListStyle>
<itemListStyle>width:150px</itemListStyle>
</config>
</TCEforms>
</what_to_display>
</el>
</ROOT>
</T3DataStructure>
meine main:
function main($content,$conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
// load language
$this->pi_loadLL();
// Initialize the FlexForms array
$this->pi_initPIflexForm();
...
in $this->cObj->data ist kein feld namens 'pi_flexform', warum nicht? Ich kann mit $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'what_to_display', 'sDEF') nicht darauf zugreifen???
enthalten ist
[data] => Array
(
[uid] => 1
[pid] => 0
[t3ver_oid] => 0
[t3ver_id] => 0
[t3ver_wsid] => 0
[t3ver_label] =>
[t3ver_state] => 0
[t3ver_stage] => 0
[t3ver_count] => 0
[t3ver_tstamp] => 0
[t3ver_swapmode] => 0
[t3_origuid] => 0
[tstamp] => 1180118236
[sorting] => 256
[deleted] => 0
[perms_userid] => 1
[perms_groupid] => 0
[perms_user] => 31
[perms_group] => 31
[perms_everybody] => 0
[editlock] => 0
[crdate] => 1180118236
[cruser_id] => 1
[title] => Test2.T4MEDIA
[doktype] => 1
[TSconfig] =>
[storage_pid] => 0
[is_siteroot] => 0
[php_tree_stop] => 0
[tx_impexp_origuid] => 930
[url] =>
[hidden] => 0
[starttime] => 0
[endtime] => 0
[urltype] => 1
[shortcut] => 0
[shortcut_mode] => 0
[no_cache] => 1
[fe_group] =>
[subtitle] =>
[layout] => 0
[target] =>
[media] =>
[lastUpdated] => 0
[keywords] =>
[cache_timeout] => 0
[newUntil] => 0
[description] =>
[no_search] => 0
[SYS_LASTCHANGED] => 1180118236
[abstract] =>
[module] =>
[extendToSubpages] => 0
[author] =>
[author_email] =>
[nav_title] =>
[nav_hide] => 0
[content_from_pid] => 0
[mount_pid] => 0
[mount_pid_ol] => 0
[alias] =>
[l18n_cfg] => 0
[fe_login_mode] => 0
)
Bitte dringend um schnelle Hilfe, DANKE!
versuchst Du etwa aus dem BE auf die Flexform zuzugreifen ?
Ansonsten ist da was oberfaul: pid=0 und uid=1, das kann nicht aus einem FE-Plugin kommen.
kannst Du die ext mal zum dl anbieten ? dann schau ich mal rein
Mit Hilfe wurde nun folgendes herauskristallisiert:
falsch:
page = PAGE
page.typeNum = 0
page.10 < plugin.tx_plugin_pi1
richtig:
page = PAGE
page.typeNum = 0
page.10 < styles.content.get
Ich glaube wer darüber nachdenkt weiß warum... Trivial aber man muß draufkommen :/
Danke für all die Bemühungen (insb. steffenk)!