[TYPO3] how to build a link with pid and uid

Kay Strobach typo3 at kay-strobach.de
Sat Sep 27 21:36:23 CEST 2008


Sven Jürgens schrieb:
> has anyone a hint for me ?
> 
> I want to write an FrontEnd extension.
> In the Backend you can select a page and in the Frontend it should be
> a link to that page.
> I imagine something like that
> 
> <a href ="uid" title="pid:title - uid:title">pid:title - uid:title</a>
> 
> But how can i get the title of the pid with localisation in mind.
> 
> Greetings Sven

Hello Sven,

insert this in your fe plugin class

$pageSelect = t3lib_div::makeInstance('t3lib_pageSelect');
$page = $pageSelect->getPage($id,false);
//alternative
$page = $pageSelect->getPage_noCheck($id,false);

$str = $page['title'];

$content.=$this->pi_linkTP(
	$str,
	$id,
	$target='',
	$urlParametersArray=array()
)

more info @ 
http://doxygen.frozenkiwi.com/typo3/html/d1/d86/classt3lib__pageSelect.html#9a58fc0813ea6472b78aefa0b30a1470
or
http://doxygen.frozenkiwi.com/typo3/html/

CU Kay


More information about the TYPO3-english mailing list