[TYPO3-dev] create links to external URLs in frontend plugin

Steffen Kamper steffen at sk-typo3.de
Mon Sep 17 12:54:51 CEST 2007


Hi Brian,

in such cases i prefer to buid links with typolink
$this->cObj->typolink('text',array(
  'parameter' => $domain,
  'additionalParams' => '&...',
  'extTarget => '_blank',
  ...
));

vg  Steffen

"Brian Bendtsen" <nightowl at galnet.dk> schrieb im Newsbeitrag 
news:mailman.1.1190019306.25422.typo3-dev at lists.netfielders.de...
> Brian Bendtsen skrev:
>> Hi
>>
>> I have a problem with an extension I have made.
>>
>> Im using pi methods to create links, but now I need to create links as 
>> external URLs, because I need to handle multiple domain records.
>>
>> So I will have to dynamicaly create links like:
>>
>> http://ab.mentor-it.dk/index.php?id=12&amp;no_cache=1&amp;tx_ebbolig_pi1[showUid]=6 
>> http://cd.mentor-it.dk/index.php?id=14&amp;no_cache=1&amp;tx_ebbolig_pi1[showUid]=6 
>> where the domain name is fetched from a database.
>>
>> Is this possible?
>>
>> Let me know if I have to elaborate.
>>
>> /Brian Bendtsen
> So far I have "solved" this issue like this:
>
> $domain = www.fromdatabase.com
>
> return 
> $this->pi_linkTP_keepPIvars($this->pi_getLL('tx_ebbolig_linkTilAfdeling',''), 
> array('showUid' => 
> $row['uid']),'','',$altPageId="http://".$domain."/index.php?id=".$pageID."&no_cache=1tx_ebbolig_pi1[submit]=submitted&amp;tx_ebbolig_pi1[afdID]=".$this->internal['currentRow']['uid']);
>
> but this is not very TYPO3 or pretty, so if there is another way I would 
> like to know.
>
> /Brian 






More information about the TYPO3-dev mailing list