[TYPO3] Able to set entryLevel for special item 'browse'.

Sebastian Holmqvist sebastian.holmqvist at gmail.com
Fri Apr 28 16:07:46 CEST 2006


On 4/26/06, Sebastian Holmqvist <sebastian.holmqvist at gmail.com> wrote:
>
> I'm using .special = browse to show the current submenu being used.
>
> This is my current TS:
> ###
> lib.curr_submenu = HMENU
> lib.curr_submenu.special = browse
> lib.curr_submenu.special.items = up
> lib.curr_submenu.1 = TMENU
> lib.curr_submenu.1.NO = 1
> ###
>
> As you can see, I'm using 'up' to display the current submenu-category. My
> structure consists of three (3) levels. The first (1) level is never
> reached, as it's a shortcut to the first element in the second (2) level.
> The problem I have is to make sure that level one (1) is never shown as a
> submenu-category when I'm using .special.items = up.
>
> Lvl 1 (Shortcut to lvl 2)
> ||
> \/
> Lvl 2 (Submenu-category) When selected, display this!
> ||
> \/
> Lvl 3 (Submenu-item) When selected, display lvl 2
>
> This I thought could we set by having .entryLevel = 2. Unfortunately the
> TSref says:
> "The .special property [...] NOTE: Don't set .entryLevel for a HMENU when
> using this option! Also be aware that this selects pages for the first
> level
> in the menu."
>
> Can you see my dilemma? Is there another way of accomplishing what I want
> or
> can I somehow hardcode a workaround for this?
>
> Greetings!
> --
> Sebastian Holmqvist
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>

Well, I kinda solved it with a differnet approach.

Code follows:
[treeLevel = 3]
lib.curr_submenu = HMENU
lib.curr_submenu.special = browse
lib.curr_submenu.special.items = up
lib.curr_submenu.1 = TMENU
lib.curr_submenu.1.NO{
   wrap = |
   doNotLinkIt=1
}
[else]
lib.curr_submenu = TEXT
lib.curr_submenu{
  value={page:title}
  insertData=1
  wrap=|
}
[end]

As you can see I use Conditions to determine if I'm on the right level. This
works for me and can also be expanded with more levels.

--
Sebastian Holmqvist



More information about the TYPO3-english mailing list