With THEME_menu_tree()
we can change the markup of the <ul>
element and with THEME_menu_link()
we can add css classes to the items of it easely. But what if we have an IF IS IN THIS BLOCK condition to incept?
Not THEME_menu_tree
nor THEME_menu_link()
know in which block the menues are, they alter, because both will alter all menus known by system.
Two ways came in mind, but both were dead ends: 1) pass a variable from THEME_preprocess_block()
to THEME_menu_tree()
and THEME_menu_link()
-> No, makes no sense. Still, they don't know what to do with it nor can they follow the foreach() of THEME_preprocess_block()
, because they have no conditions for blocks. 2) Finding a higher entry level to pass the condition over and alter the menu attributes and its item attributes from there.
Well. Good point. But where would that be? Printing out the $variables inside THEME_preprocess_block() was like counting drops in the ocean. Can someone please enlighten me if I am right with the second thought and with where to look at?