[TYPO3-dev] Avoid rendering menu based on number of items

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Mon Apr 28 21:31:30 CEST 2008


John Angel schrieb:
> Hi,
> 
> In the code bellow, no matter of stdWrap.if condition, Typo3 is always making the complete menu tree like it will be displayed. I understand this is behavior by TS design.
> 
> submenu = HMENU
> submenu {
> 	entryLevel = 1
> 
> 	1 = TMENU
> 	1.NO.allWrap = |
> 
> 	stdWrap.if {
> 			value.data = register:count_menuItems
> 			isLessThan = 1
> 			isGreaterThan = 5
> 	}
> }
> 
> So the process is something like this:
> 
> {count menu items}
> {build menu - calling typoLink for every single page}
> {check is number of menu items is larger than 1 and smaller than 5} => display menu or not
> 
> Is there some workaround to process the condition first, like this:

A user function?

Masi




More information about the TYPO3-dev mailing list