[TYPO3-english] Create a full url with TYPO3

Iban Cardona i Subiela icardona at serialnet.net
Wed Jan 4 12:13:28 CET 2012


It works!

Thank you so much!

On 01/03/2012 06:05 PM, Jigal van Hemert wrote:
> Hi,
>
> On 3-1-2012 15:23, Iban Cardona i Subiela wrote:
>> I'd like to create a url in format "http://www.google.com" using some
>> TYPO3 function similar to "pi_getPageLink".
>> Do you know if there is any feature?
>
> Why not use the mother of all link functions: tslib_cObj::typolink()
>
> In your pibase extension it's available through
> $this->cObj->typolink($linkText, $configuration);
>
> Configuration can be found in TSref for the TypoScript typolink
> property but then in an array form:
> $configuration = array(
>   'parameter' => 23,
>   'additionalParams' => '&tx_myext_pi1[myvar]=' . intval($myvar),
>   'forceAbsoluteUrl' => 1,
>   'returnLast' => 'url'
> );
>
> If you need to set sub-properties make sure the property above ends
> with a dot:
>   'additionalParams.' => array(
>     'insertData' => 1,
>   )
>
> So typolink.additionalParams.insertData = 1 becomes
> $configuration['additionalParams.']['insertData'] = 1;
>
> Now you can use forceAbsoluteUrl to create a complete url as you want.
>

-- 

 
*  IBAN CARDONA I SUBIELA*  




More information about the TYPO3-english mailing list