[TYPO3-dev] About empty cHash
Francois Suter
fsuter at cobweb.ch
Tue Feb 19 21:12:43 CET 2008
Hi,
> can you show how you create the links?
Sure. In the TS setup of pi1, there's something like:
plugin.tx_vgetagcloud_pi1 {
tagWrap {
dataWrap = <li style="font-size: {field:tag_style}%">|</li>
typolink {
parameter.data = field:tag_link
additionalParams.dataWrap =
&tx_vgetagcloud_pi2[pages]={field:tag_pages}&tx_vgetagcloud_pi2[keyword]={field:tag_keyword}
ATagParams.dataWrap = id="tag{field:tag_id}" title="{field:tag_keyword}"
}
}
}
This TS is then used on each keyword by calling:
$tags[] = $this->cObj->stdWrap($aKeyword,$this->conf['tagWrap.']);
The reason for using such a TS setup is to be very flexible as to what
kind of link you put on each keyword. Instead of pointing to a page
containing the pi2, it could point to the indexed search engine, the
news search engine, etc.
In the meantime I have found another solution which is equivalent in my
case, as fas as I can tell.
My pi2 expect only 2 possible parameters. The empty cHash thing occurs
obviously when both are empty. So if I catch this condition with a test
and call $GLOBALS['TSFE']->set_no_cache(); I arrive at the same result
that if the cHash parameters was passed and
$GLOBALS['TSFE']->set_no_cache(); were called by
$GLOBALS['TSFE']->reqCHash();
Unless I've got it wrong... :-)
Cheers
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
More information about the TYPO3-dev
mailing list