[Typo3-dev] Where is my "addRootLineFields" field?
Davide Principi
d.principi at nospamme.provincia.ps.it
Mon Oct 17 18:14:31 CEST 2005
Hi all,
I need an help. I'm trying to read a field from the rootline-array using
getRootLine(), added on "addRootLineFields" in my ext_tables.php.
The rootline I want to scan is not the "current" one, so I make another
instance of pageselect in this way:
$sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
$sys_page->init(true);
$rootline = $sys_page->getRootLine($page_id);
foreach($rootline as $item) {
if($item['my_field'] > 0) {
return $item['my_field'];
}
}
...where $page_id is the arbitrary page uid. Note that the current page
uses cHash, so different versions of the page are possible.
It works the FIRST time Typo3 generates the page and store it in the
cache: my_field is present and the function returns the value.
But on next request it seems there is not "addRootLineFields" at all.
There is a side effect on the cached version of the page. Seems GLOBALS
are not available as on the first time.
Any suggestion?
Thank you in advance,
--Davide Principi (dabba)
More information about the TYPO3-dev
mailing list