[TYPO3-dev] Links in backend modules

Jonas Dübi admin at commandline.ch
Tue Jan 13 09:17:40 CET 2009


Hi Everybody

I am looking for the best and most consistent way of making links in 
backend modules.

Since the backend modules are called over on central script (which is 
great) some of the ways how to link do not work anymore.
(all with index.php/)

Some of the ways people make links in backend modules:

-> hard coded // not realy flexible
<a href="index.php...">

-> individual solution (realurl), nice for adapting but not TYPO3 standard
function linkSelf($addParams)	{
	return 
htmlspecialchars('index.php?id='.$this->pObj->id.'&showLanguage='.rawurlencode(t3lib_div::_GP('showLanguage')).$addParams);
}

-> kind of refresh link :-) // request the same url again:
<a href="'.htmlspecialchars(t3lib_div::getIndpEnv('REQUEST_URI')).'">'.

-> using backpath:
<a href="'.$BACK_PATH.'mod/tools/em/index.php?&id=0&SET[function]=0">

-> using linkThisScript (does funny things sometimes)
<a 
href="'.htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' 
=> $row['uid']))).'" class="typo3-red">+</a>

----> why is there everywhere a htmlspecialchar() around linkThisScript? 
Wouldn't it be easier to put the htmlspecialchar() into linkThisScript?

I couldn't find any documentation or hint how to link properly in the 
backend.

What's your way?

Best regards
Jonas




More information about the TYPO3-dev mailing list