[TYPO3-english] tslib_pibase::pi_linkToPage - setting link title?

Simon Child simon at srchild.com
Tue Dec 29 15:05:21 CET 2009


Is it possible to set the title attribute when creating a link in an 
extension using tslib_pibase::pi_linkToPage?

Maybe I should use tslib_pibase::pi_getPageLink  and then construct the link 
manually using the url given by tslib_pibase::pi_getPageLink ?


PS ?bug in tslib_pibase::pi_getPageLink or in documentation: API says it 
takes a target parameter, but a) this makes no sense when it is just 
constructing a URL, and b) unsurprisingly it doesn't appear to add a target 
attribute when I give it one?

The following all give the same (desired) result:

$content .= '<li><a href="'.$this->pi_getPageLink('15',$para).'" title = "my 
Title" target="_details_">Link String</a></li>';

$content .= '<li><a href="'.$this->pi_getPageLink('15','',$para).'" title = 
"my Title" target="_details_">Link String</a></li>';

$content .= '<li><a 
href="'.$this->pi_getPageLink('15','_anotherTarget_',$para).'" title = "my 
Title" target="_details_">Link String</a></li>';


but this does not have the target attribute set:

$content .= '<li><a 
href="'.$this->pi_getPageLink('15','_anotherTarget_',$para).'" title = "my 
Title">Link String</a></li>';


Thanks

Simon Child







More information about the TYPO3-english mailing list