[TYPO3-english] Two levels HMENU, expanding only the parent of the current page (if any)

bernd wilke t3ng at pi-phi.tk
Thu Aug 19 22:17:22 CEST 2010


Am Thu, 19 Aug 2010 14:32:36 +0000 schrieb Claudio Strizzolo:


> I need to make the menu very general, therefore the level of the top
> menu to be considered (i.e. "people", "fruits", "planets") is passed
> from the page to the TS building the menu through a constant, i.e.:
> 
> sideMenuLevel = 2
> 
> Then I need to test the treelevel against this constant PLUS 1, because
> sideMenuLevel refers to one level above. Is some simple arithmetics
> available in TS? I tried the following but they did not work:
> 
> [treeLevel = {$sideMenuLevel + 1} ]
> [treeLevel = {$sideMenuLevel}+1 ]

look for: stdWrap.prioriCalc
but inside of conditions? I think that will not do
 
> The following works, but of course on a wrong level:
> 
> [treeLevel = {$sideMenuLevel}]
> 
> Any hints?

ommit/hide level 1 of your definition and start at level 2?
 
temp.menu = HMENU
temp.menu {
	1 {
		NO.aTagParams = style="display:none;"
		// or:
		NO.doNotShowLink = 1
	}

		// formerly known as 1
	2 {
		NO ...
		:
	}
		// formerly known as 2
	3 {
		:
	}
}


bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-english mailing list