[TYPO3] Where are the TS experts ??????

Ron Hall ron at busynoggin.com
Tue Oct 10 00:09:33 CEST 2006


Dear Johannes,

I had seen your earlier posts and I think there is a way to visually
accomplish your intent by how you handle your css for the menu. Keep in mind
this is only something I have thought up as a possible approach but I have
not written real world code to do it.

Here is what I understand you want:

Where " menu 1" is chosen it should look like this:

-menu 1 (CUR)
   -menu 1.2 (NO)
   -menu 1.3 (NO)
   -menu 1.4 (NO)
-menu 2 (NO)
-menu 3 (NO)

Where " menu 1.2" is chosen then "menu 1.3" & "menu 1.4" should disappear
and the menu should look like this:

-menu 1 (ACT)
   -menu 1.2 (CUR)
     -menu 1.2.1 (NO)
     -menu 1.2.2 (NO)
     -menu 1.2.3 (NO)
-menu 2 (NO)
-menu 3 (NO)

Here is a possible method to do it. Basically, menus would be given class
styles according to their states. Again going back to the examples:

Where " menu 1" is chosen it should look like this with the classes:

-menu 1 (CUR) class=level_1_current
   -menu 1.2 (NO) class=level_2_normal
   -menu 1.3 (NO) class=level_2_normal
   -menu 1.4 (NO) class=level_2_normal
-menu 2 (NO) class=level_1_normal
-menu 3 (NO) class=level_1_normal


But when "menu 1.2" is chosen it looks like this

-menu 1 (ACT) class=level_1_active
   -menu 1.2 (CUR) class=level_2_current
     -menu 1.2.1 (NO) class=level_3_normal
     -menu 1.2.2 (NO) class=level_3_normal
     -menu 1.2.3 (NO) class=level_3_normal
   -menu 1.3 (NO) class=level_2_normal
   -menu 1.4 (NO) class=level_2_normal
-menu 2 (NO) class=level_1_normal
-menu 3 (NO) class=level_1_normal

Now the key is "class=level_2_normal." Set your css styling so that this
style displays normally EXCEPT when its parent menu item is of the class
"level_1_active" In this instance simply set up your css to not allow those
items to be visible.

Now, you may have to do some browser testing to make sure it works as you
wish. Also, the few people who have styles turned off will be able to see
those "hidden" menu items as well as the few people who use screen readers
(although I think you can take care of that in css as well).

Anyway that is an alternate way of visually achieving the effect you are
after. It needs no unusual typoscript but will take some css work.

Ron Hall





More information about the TYPO3-english mailing list