[TYPO3-dev] problem with XCLASS: how to override a function in class.t3lib_browsetree.php ?
stefano cecere
scecere at krur.com
Mon Jan 14 10:29:32 CET 2008
thanks Daniel
i tried to xclass every class between alt_db_navframe.php to class.t3lib_browsetree.php
without success
ince i'd like to fix this issue soon... isn't anybody (Daniel?) offering fast (and paid!!) support for these kind of technical needs?
please contact me privately.
ps: i'm going to post the solution later here
thanks
stefano
Daniel Pötzinger wrote:
> stefano cecere schrieb:
>> 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.
>>
>> :(
>
> Is that the reason:
> http://typo3.org/fileadmin/typo3api-4.0.0/d1/d1f/classt3lib__browseTree.html
>
>
> I think you try to modify that function for one of the child-classes?
> the t3lib_browsetree is used by many classes as baseclass - therefore
> your XCLASS has no effect. (because "localPageTree extends
> t3lib_browseTree")
>
> You can instead XCLASS one of the childs.
>
> Greetings
>
More information about the TYPO3-dev
mailing list