0

I would now like to 'combine' DataHandler::setHistory() and typoLink_URL() in order to get the URL of whatever has been changed.

For a simple page, the below snippet does the trick:

$conf['parameter'] = 55;
typoLink_URL($conf);

To account for foreign languages, typoLink_URL requires an addition parameter:

$conf['additionalParams'] = '&L=2';

Also, the URL of a page created by a plugin may be retrieved via an additional parameter, such as:

$conf['additionalParams'] = '&tx_ttnews[tt_news]=' . 2;

Is there a more generic way to get URLs? In other words, how do I find out the URL regardless of whether or not I know anything about the plugins installed?

bernland
  • 688
  • 8
  • 16

1 Answers1

0

You get the URL of the current page. All the parameters will be given.

 $site_url = t3lib_div::getIndpEnv('TYPO3_REQUEST_URL');

You call could look like this:

$conf['additionalParams'] = substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL')));
Franz Holzinger
  • 913
  • 10
  • 20