[Typo3] Pls. help. Extension, main function, fe rendering. Thks.
mario
chiari.hm at flashnet.it
Fri Oct 21 01:34:11 CEST 2005
Hello,
looking for help again.
I am trying to understand how to modify an extension, as to include some
kind of fe rendering.
To try to understand what I need, I define a very simple extension.
Therein the >main< function is defined as it follows.
..
require_once(PATH_tslib."class.tslib_pibase.php");
...
function main($content,$conf) {
$this->conf = $conf; // Setting the TypoScript passed to this
function in $this->conf
$this->pi_setPiVarDefaults();
$this->pi_loadLL(); // Loading the LOCAL_LANG values
$this->pi_USER_INT_obj = 1; // Disable caching
$entryTable = 'tx_MY_book';
t3lib_div::loadTCA($entryTable);
$tcaFields =
explode(',',$GLOBALS['TCA'][$entryTable]['feInterface']['fe_admin_fieldList']);
foreach($tcaFields as $key => $value){$mycontent .=
$key."-->".$value."<BR>";}
return $mycontent;
}
Now, $mycontent seems to be empty and nothing is returned on the FE.
Why?
Note, that (almost) the same code works fine within a PHPscript plugin:
<?php
require_once(PATH_tslib."class.tslib_pibase.php");
$entryTable = 'tx_bookdb_book';
t3lib_div::loadTCA($entryTable);
$tcaFields =
explode(',',$GLOBALS['TCA'][$entryTable]['feInterface']['fe_admin_fieldList']);
foreach($tcaFields as $key => $value){$mycontent .=
$key."-->".$value."<BR>";}
echo $mycontent;
?>
Any hint is welcome.
Thanks
mario
More information about the TYPO3-english
mailing list