[TYPO3-dev] TypoScript: Prevent typoLink from using a variable in config.linkVars

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Nov 8 16:30:35 CET 2006


Oliver Hader schrieb:
> Hi developers,
> 
> does anyone of you know a possibility in TypoScript to prevent that a
> variable that is defined in config.linkVars is outputted by typoLink?
> 
> TypoScript Example:
> config.linkVars = type,tx_myext_pi1[var]
> page.10 = TEXT
> page.10 {
>   value = Set the variable
>   typolink {
>     useCacheHash = 1
>     additionalParams = &tx_mxext_pi1[var]=123
>   }
> }
> page.20 = TEXT
> page.20 {
>   value = Reset the variable
>   typolink {
>     additionalParams = &tx_mxext_pi1[var]=
>     _removeParams_ = tx_mxext_pi1[var]
>   }
> }
> 
> So, if I set the GP-variable to nothing ("&tx_mxext_pi1[var]="),
> typoLink creates something like "index.php?id=1&&tx_mxext_pi1[var]".
> But I'd like to have "index.php?id=1" without the GP-variable.
> 
> So, if someone has a hint on this, please share it! ;)
> If not, I'd like to change tslib so that a new TypoScript parameter
> "_removeParams_" could be used. This one accepts a comma separated list
> of GP-vars to be removed from a typoLink call. If I shall do so, I'll
> add a feature-request in the bugtracker and attach a patch for tslib.
> 

Try this:

page.20 = TEXT
page.20 {
   value = Reset the variable
   typolink {
#    addQueryString.method = GET
     addQueryString.exclude = tx_mxext_pi1[var]
   }
}

Masi




More information about the TYPO3-dev mailing list