[TYPO3-english] How to get URL query string in extension class

David Bruchmann typo3-en at bruchmann-web.de
Thu Oct 22 10:26:53 CEST 2009


----- Ursprüngliche Nachricht -----
Von:        Sebastian Gebhard <sebastian.gebhard at googlemail.com>
Gesendet:   Donnerstag, 22. Oktober 2009 10:03:53
An:         typo3-english at lists.typo3.org
CC:
Betreff:    Re: [TYPO3-english] How to get URL query string in extension 
class
> David Bruchmann schrieb:
>> 1) $this->piVars holds all post- and get-Variables in an array
> It holds all you Plugin vars, i.e. all paramters prefixed with 
> $this->prefixId.
> If he wants to include all parameters in his link, typolink could help 
> for example
> 
> $url = $this->cObj->typoLink_URL(array(
>   'parameter' => $GLOBALS['TSFE']->id,
>   'addQueryString' => 1
> ));
> 
> 
> Of course there are options to exclude and add parameters. Refer to 
> TSref section typolink.

Right, simple Variables like &something=5 aren't fetched with 
$this->piVars. But in FE all URL-Variables should use $this->prefixId 
even if I know that some extensions like cwt_community do not.

In the moment I'm writing an extension where to different prefixId's are 
used and one of them is manipulated in some cases to prefixId.'_s' or 
prefixId.'_i'. Neverthelesss it's always clear that the values belong to 
my extension.
Unique Namespace always is important, so variables without prefixId 
shouldn't be used at all.

Best Regards
David


More information about the TYPO3-english mailing list