[Typo3-dev] "HMENU.special.userFunc": how to add to the internal array directly rather than via a function?

Christopher tombedlam at yahoo.com
Thu Sep 9 21:51:00 CEST 2004


Greetings,

I was trying to update the "< Prev Page 1 Page 2 Next >" style
navigation in an extension of mine, when I had the brilliant idea to
use an HMENU object instead of the function produced by the
kickstarter. I consulted the TSref and found - as usual! - that someone
thought of this before me :-)

Anyway, using the syntax "HMENU.special.userFunc = ..." works fine, but
there is a problem. The function is apparently executed *before* the
remainder of the function class. This results in unusable output since
the function doesn't know how many records are returned from the main
query... 

'No problem,' I thought, 'I'll just populate the HMENU array directly.'
But I can't find out how the output from .userFunc fits into the HMENU
array. Debug is not helpful, as it shows something like this:

special	userfunction
special.userFunc | className->hmenuBrowser
wrap | <ul id="hmenuBrowser">|</ul>
1 | TMENU
1.wrap | <ul>|</ul>
NO.linkWrap | <li>|</li>

Can anyone clue me in about how to populate the array directly? The bit
in the TSref is not clear about how the TS HMENU array gets fed the
output of the makeMenuArray() function in the example in the HMENU
section.

Alternatively, is there some way that I can prevent the userFunc
function from being called before the rest of the extension class?

-Christopher


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 





More information about the TYPO3-dev mailing list