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

Claudio Strizzolo claudio.strizzolo at ts.nogarb.ageinfn.it
Thu Aug 19 16:32:36 CEST 2010


Hi Bernd,
thank you for your response (and to Kristian Domke too).
Your suggestions helped me to understand menus better.
Now I'm not far from the solution.
I still have a question:

On Thu, 19 Aug 2010 14:06:57 +0000, bernd wilke wrote:
> you may include a condition regarding the pagelevel to insert the
> definition of the second menu-level only if you are on this level
> 
> something like this (try your treelevel):
(...)
> // this level is shown only if you are inside this level
> [treeLevel = 1]
> temp.sidemenucol.10.2 = TMENU
> temp.sidemenucol.10.2 {
>     noBlur=1
>     wrap=<ul class="sidemenu-l2">|</ul>
>     NO < sidemenu_no
>     CUR < sidemenu_cur
>     ACT < sidemenu_act
>     SPC < sidemenu_spc
>     SPC.allWrap=</ul><div class="sidemenu-l2-spacer">|</div><ul
> class="sidemenu-l2">
> }
> [global]

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 ]

The following works, but of course on a wrong level:

[treeLevel = {$sideMenuLevel}]

Any hints?

Thanks again

Claudio


More information about the TYPO3-english mailing list