[TYPO3-dev] problem with XCLASS: how to override a function in class.t3lib_browsetree.php ?

stefano cecere scecere at krur.com
Tue Jan 15 13:56:38 CET 2008


resolved:

1) i need to xclass webPageTree (thanks Benjamin)
2) the xlassing name has to have EXACTLY the same name of the xclassed one..

so:

class ux_webPageTree extends webPageTree {


that's it.

i'll give myself a Japanese restaurant lunch as reward :)


stefano cecere wrote:
> please i'm struggling for days with this (it should be simple) thing:
> 
> i'd like to override the function getTitleStr in 
> class.t3lib_browsetree.php, so to customize the page tree title 
> rendering with
> a custom function.
> 
> 
> but i can't make the right XCLASS! i could not find much docs about it.
> 
> right now i have (in my ext_localconf.php ) this line:
> 
> $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_browsetree.php'] 
> = t3lib_extMgm::extPath($_EXTKEY).'class.ux_t3lib_browseTree.php';
> 
> 
> within class.ux_localPageTree.php i set:
> 
> class ux_t3lib_browseTree extends t3lib_browseTree {
>     
>     function getTitleStr($row, $titleLen = 30) {
>          /// my func
>     }
> }
> 
> 
> shouldn't it be enough?
> it seems not, since it doesn't work enyway.
> 
>  :(
> 
> thanks
> stefano




More information about the TYPO3-dev mailing list