[Typo3-dev] Calling a user function in menus from postUserFunc, itemArrayProcFunc, postUserFunc

Ries van Twisk typo3 at rvt.dds.nl
Tue Mar 29 23:12:27 CEST 2005


hey all,

I use the TS options postUserFunc,itemArrayProcFunc,postUserFunc
quite a lot to generate my fairly (for me at least...) menu's at 
www.livetravelguides.com

I call them like this:

_leftmenu.20.special = keywords
_leftmenu.20.special.entryLevel = -1
_leftmenu.20.special.depth = 16
_leftmenu.20.special.startUid.postUserFunc.setKeywords = 
citypage,countrypage,subcontinentpage,continentpage,worldpage
_leftmenu.20.special.startUid.postUserFunc = 
tx_ltgextendedmenus_pi1->ts_findPageUid
(startUid is created a extra option for keywords based menu's by 
myself... see: http://bugs.typo3.org/bug_view_page.php?bug_id=0000839)
or
_hotelscities.20.1.itemArrayProcFunc.setKeywords = citypage
_hotelscities.20.1.itemArrayProcFunc.sortmode = popularity
_hotelscities.20.1.itemArrayProcFunc.maxLevels = 1
_hotelscities.20.1.itemArrayProcFunc.menuListLimit = 7
_hotelscities.20.1.itemArrayProcFunc = 
tx_ltgextendedmenus_pi1->ts_removeToLTGmenu
or
_hotelsmenu.90.2.userFunc.value = Add a new Hotel
_hotelsmenu.90.2.userFunc.wrap = <div class="style1 style4 
style6"><b>|</b></div>
_hotelsmenu.90.2.userFunc.formCode = 000502
_hotelsmenu.90.2.userFunc = tx_ltguserForms_pi1->ts_getEncryptedpageRef

And I notice that my class tx_ltguserForms_pi1 get's initalised everytime
I call a function within the class..
Ofcourse this will cause a lot of overhead...

Can i setup/change my situation in such a way that the class get's 
initliased only once
and only the functions are called???

I am currently experiancing a page generation time of about 9500ms which 
I intend
to reduce in the near feature...

All of the menu's are sorted on rating and/or popularity, the statistics 
for this are gathered once a
day using a php file and put on a special field in the pages table. This 
means I also have to
clean the cache once a day so a FE user sees the new/changed menu order....

So I need to dramaticly reduce the page generation time so new users 
will have a great experiance with my site!!
and I think I need to start at the menu system to reduce the overall time.

Any advice for me???

cheers,
Ries


-- 
R. van Twisk
http://www.metamorf.net

Our Typo3 enabled website: http://www.livetravelguides.com
Instand help for Typo3?    irc:/irc.freenode.net/typo3
Looking for documentation? http://typo3.org/documentation/






More information about the TYPO3-dev mailing list