[TYPO3-english] RealURL + tt_news + valueMap + noMatch

Andy Pattynama andy.pattynama at gmail.com
Wed Dec 14 12:24:09 CET 2011


On Wed, Dec 14, 2011 at 11:33 AM, Andy Pattynama
<andy.pattynama at gmail.com>wrote:

>
> Andy Pattynama wrote:
> >
> >> Now my question is: how can I totally eliminate the sViewPointer
> variable,
> >> if it's empty?
>

Here's the solution on how to eliminate the empty get variable (there might
be an easier solution):
1. Create a hook in your extension (ext_localconf.php) like
this: $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['cHashParamsHook']['your_extension']
=
'EXT:yourextension/res/class.tx_yourextension_hook.php:&tx_yourextension_hook->user_chashparams';
2. Here's the content of the class.tx_yourextension_hook.php file:
    class tx_yourextension_hook {
function user_chashparams($params) {
if($params["pA"]['tx_ttnews[sViewPointer]'] == '') {
unset($params["pA"]['tx_ttnews[sViewPointer]']);
}
}
   }

That's the quick and dirty solution, of course, this could be extended to
purge all empty get variables.

Best regards,
Andy


More information about the TYPO3-english mailing list