[Typo3] search pages and extension content
christian oettinger
christian.oettinger at gmx.de
Tue Aug 2 17:18:12 CEST 2005
Some time later, the problem is solved.
I in fact use indexed_search as a search for everything, including the
records of my own extension. The steps are the following (in an
extension started with kickstarter and the modified):
- check that the extension is cachable (USER object, not USER_int):
in ext_localconf.php look for call o function t3lib_extMgm::addPItoST43
for each plugin that should be cachable and set the 4th parameter to
true (i.e. 1)
from this point on, the page where your records lie is cached one time
and then always the same content is shown, don't matter which additional
pi_parameters are tranferred (usually showUid).
- so extend function main of your plugin class so that indexed search
and the caching mechanism will respect an additional variable. In my
case I modify the class pi1/class.tx_oebooksandmagazines_pi1.php:
$this->pi_USER_INT_obj = 0; // Configuring so caching is expected.
This value means that cHash params are set.
$this->pi_autoCacheEn = 1;
// adding additional parameter for indexed_search
$this->piautoCacheFields = array (
'tx_oebooksandmagazines_pi1[showUid]' => array ('list' => array (0,1)),
);
that is already all. You just have to cache the pages now (using unix
tool wget for example) and you're done.
Now one little thing to mention: careful if you add more parameters that
multiply each other. So if I have showUID and mode from 1 to 3 and also
4 languages you get quite a lot pages to cache. Just 50 records in this
example would give you 600 Pages to cache!
greetings and thanks to everybody who helped me to find out!
oe (christian)
More information about the TYPO3-english
mailing list