[TYPO3-english] how to get realurl path for a page id in CLI Mode / create links with getTypoLink in CLI Mode

Marco Weber marco.weber at uni-trier.de
Tue Oct 14 20:29:09 CEST 2008


Hi,

I want to run a CLI script, that sends outs emails with typo3links inside.
( I could simply create the links like this: 
http://www.mydomain.com/index.php?id=7 , but since im using realurls i 
would like to get the realurl path... )

I know, that following simple script doesnt work in CLI, because of the 
absence of $GLOBALS['TSFE'] :

include_once(PATH_site.'typo3/sysext/cms/tslib/class.tslib_content.php');
$cObj=t3lib_div::makeInstance('tslib_cObj');
echo $cObj->getTypoLink('HI', 7);

Now here is my question:
How can i get the realurl path for an page id in CLI MODE?

Thanks in advance for any reply... :)
      Marco


More information about the TYPO3-english mailing list