[TYPO3-dev] How to get a link to a FE page from a BE module?

Oliver Klee typo3-german-01 at oliverklee.de
Sat Apr 8 13:45:23 CEST 2006


Hi,

Ricardo Scachetti Pereira schrieb:
>    I've been trying to render a link to a front-end page on my back-end
> module, without success.
> 
>    I've used the pi_getPageLink() function and friends (typolink) in
> some plugins I have developed without any problems, but I don't know how
> to do the same from my back-end module because I don't have an instance
> of the pi_base class at hand.

What happens if you create a pi_base object for this? Usually, a content
object also should suffice as it provides getTypoLink().

This may work (not tested):

$cObj =& t3lib_div::makeInstance('tslib_cObj');
$linkTag = $cObj->getTypoLink('view it', $pageID);

Hope this helps,


Oliver




More information about the TYPO3-dev mailing list