[TYPO3-english] builduing a correct tt_news single link

Lina Wolf liste at linawolf.de
Mon Aug 2 00:31:48 CEST 2010


if the following options are set in tt_news:

plugin.tt_news {
  useHRDates = 1
  useHRDatesSingle = 1
  dontUseBackPid = 1
}

The following parameter would be send to realURL / CoolURI or displayed 
directly, no matter:
index.php?id=2&tx_ttnews[year]=2010&tx_ttnews[month]=08&tx_ttnews[day]=01&tx_ttnews[tt_news]=212

Now if I set
useHRDates = 0

the link would be generated from this:

index.php?id=2&tx_ttnews[tt_news]=212

To make matters worse there might even be a hook registered that added or 
removed paramters.

Most extensions witch do generate links to the tt_news single view just take 
an easy approach to link generation like this:

   $params = array(
    'additionalParams' => '&tx_ttnews[tt_news]=' . $newsUid,
    'parameter' => $singlePid,
    'useCacheHash' =>1,

   );
   $result = $pObj->cObj->typolink('|', $params);

But a link generated like that would not - realURL or not - be the same like 
a link genrerated natively by tt_news.

Now there is a hook by witch you can change the singleView URL. But the 
opposite direction I cannot find: some function I could call to get a valid 
parameters for the URL considering all parameters and maybe even hooks.

Besides that these links might produce duplicate content that is several 
times cached etc, the output in the frontend might be different if the 
expected parameters are displayed in any way.




More information about the TYPO3-english mailing list