[TYPO3-english] Show and collapse submenus
Bill Young
billyoung at cox.net
Thu Aug 12 18:00:00 CEST 2010
Fran,
I needed to do the same thing and didn't see a straightforward way to do
it with typoscript or any of the extensions that I found. I ended up
writing my own extension to display the menu. I'm sure there is a much
cleaner way to do this. But, this gave me exactly what I needed. See
the attached extension script.
To call the extension from typoscript, you can put a mark in your
template for the menu and tie it to the extension using something like
the following:
page.10.marks.MAIN_MENU = USER_INT
page.10.marks.MAIN_MENU.userFunc = user_ppc_pi1->main_menu
Hope it helps.
Bill
xescjp wrote on 08/12/10 07:23:
> Hello:
> I need some help with menus.
> I have built a menu that contains the following elements:
>
> First Option Menu (A)
> First OptionSubmenu (A.1)
> Second OptionSubmenu(A.2)
> Third OptionSubmenu(A.3)
> Second Option Menu (B)
> First OptionSubmenu (B.1)
> Second OptionSubmenu(B.2)
> Third OptionSubmenu(B.3)
> Third Option Menu (C)
> First OptionSubmenu (C.1)
> Second OptionSubmenu(C.2)
> Third OptionSubmenu(C.3)
>
> At home page the submenus would be collapsed. Later if user clicks, for
> example to C option, only the submenu of C must be expanded . The other
> submenus must remain collapsed.
> If later the user clicks in B (for example), the submenus of other
> option menus (A,C) should be collapsed and sumenu options of B must be
> showed. The idea is that option menus that are not active must have his
> submenu collapsed.
> Anyone knows hot to do that?
>
> Thanks in advance.
>
> Fran
More information about the TYPO3-english
mailing list