[TYPO3-english] Create a full url with TYPO3
Stephan Schuler
Stephan.Schuler at netlogix.de
Tue Jan 3 18:23:50 CET 2012
Hi!
I would suggest to set "config.absRefPrefix" to the current baseUrl.
This should result in TypoLink prepending each relative link with the given value which makes every link an absolute one. So usually the config.absRefPrefix is the same value as config.baseUrl.
Regards,
Stephan Schuler
Web-Entwickler
Telefon: +49 (911) 539909 - 0
E-Mail: Stephan.Schuler at netlogix.de
Website: media.netlogix.de
--
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Andernacher Straße 53 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Internet: http://www.netlogix.de
netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt
-----Ursprüngliche Nachricht-----
Von: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] Im Auftrag von Jigal van Hemert
Gesendet: Dienstag, 3. Januar 2012 18:05
An: typo3-english at lists.typo3.org
Betreff: Re: [TYPO3-english] Create a full url with TYPO3
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.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert.
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
More information about the TYPO3-english
mailing list