script

Monday, January 21, 2013

Get url in typo3

function getURL($id,$additionalParams="")
    {
        $this->fullURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL');
        $cObject = t3lib_div::makeInstance('tslib_cObj');
        $configurations['additionalParams'] = $additionalParams;
        $configurations['returnLast'] = 'url'; // get it as URL
        $configurations['parameter'] =  $id;
        return $this->fullURL.htmlspecialchars($cObject->typolink(NULL, $configurations));
    }

No comments:

Post a Comment