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

Brian Bendtsen nightowl at galnet.dk
Mon Sep 17 10:54:56 CEST 2007


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&no_cache=1&tx_ebbolig_pi1[showUid]=6 
> 
> http://cd.mentor-it.dk/index.php?id=14&no_cache=1&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&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