What options allow setting the PARENT MENU field dynamically?
Use Case example
Defined Drupal menu tree:
MAIN
-A
--a.1
--a.2
-B
--b.1
--b.2
-C
--c.1
--c.2
---c.2.1
---c.2.2
Superfish block installed and enabled for all pages.
Would like the menu block to start at various points in menu tree depending on context or rule. For example, user presses some top menu item, the pass c.2 as parent menu item shows just that portion of tree. Node taxonomy is yyy, then pass C and that portion of tree is shown. Even, showing different parts of menu tree structure based on url link structure same as how blocks are shown or hidden.
Certainly, digging and modding module can accomplish but was hoping maybe there is some way to set the parent menu variable more easily in time for the superfish block to use it.
Comments
Comment #0.0
windtrader CreditAttribution: windtrader commentedformat
Comment #1
mehrpadin CreditAttribution: mehrpadin commentedHey Don, or should I say Ohayo Don :)
It's not possible, however I think I add such a thing in v2.
Comment #1.0
mehrpadin CreditAttribution: mehrpadin commentedformat
Comment #2
jessehsYou can accomplish this by copying the "theme_superfish" function out of the superfish.module file, and putting it in the theme's template.php file, renamed as "mythemename_superfish($variables)".
Then add some custom code at the top of the function to dynamically set the $mlid variable:
It would be best if you could not hard-code mlid's into the function, but in my case the active trail was not being set correctly.
Comment #3
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commented