2

I am trying to create a module that supplies a custom menu block, that changes based on what organic group you are looking at. I'm confused by the documentation, so I thought I'd ask here. I saw an answer for Drupal 7, but I'm using Drupal 6.

og_menu doesn't work for me because I don't want group admins to change it. I just want the default to be dynamic based on some logic of my own.

Specifically, should I supply a custom block from my module? If so, how do I render the list of links I create, or should be supplying a custom menu? What hook do I use?

1 Answer 1

0

Sounds like you'd really want to supply a hook_block, whose $content will call a custom PHP function that will construct your array of links to other organic groups, based on your criteria.

2
  • I'm trying that (supplying a custom block), but what is the proper D6 way to construct & render a menu from a block? Is it just to call l() a whole bunch?
    – rahulb
    Jan 26, 2012 at 20:01
  • You could construct the link array yourself with PHP, or if you have specific menus, something like menu_get_menu I think... but I don't know what your criteria is.
    – Kevin
    Jan 26, 2012 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.