I've created a patch that adds another menu_block configuration setting.

Basically when you set Starting level to "Children of active menu", it allows you to choose whether or not you still want the menu to show at end-of-the-line items, albeit with their siblings as links.

Example menu:

Link 1
Link 2
  Link A
    Link i
    Link ii
    Link iii
    Link iv
    Link v
  Link B
Link 3

When navigating to 1 > A > iv, the menu would normally disappear.
With patch in comment #1 and the toggle enabled, it will show:

Link A
  Link i
  Link ii
  Link iii
*Link iv*
  Link v

Seeing as I needed this functionality myself, I can already assure you that this patch works nicely.
I just thought it could contribute to this awesome module :)

P.S.: I think this issue may be related to and/or fix #758184: Ability show items on same level if active menu level don't have children and #1125154: "Deepest item in the active trail with visible siblings" as option for follow_parent.


Patch as promised.

Issue summary:View changes


Version:7.x-3.x-dev» 6.x-2.4
Category:feature» support

Hi there Kristiaan, your patch is AWESOME and I've made use of it in Drupal 7 installations, however, I'm wanting to apply it in a drupal 6 installation and the 3rd/4th hunks in menu_block.admin.inc won't patch (appears function menu_block_configure_form and function _menu_block_block_save) are different. I'm trying to sort this out myself atm but you might understand it well enough to be able to help quicker :) if you have the time I'd appreciate some guidance, please.

Version:6.x-2.4» 7.x-2.3
Category:support» feature

I've fixed the problem. For 6.x-2.4 (menu_block.admin.inc) you don't appear to need

@@ -436,7 +448,7 @@ function menu_block_configure_form($form, &$form_state) {
   $form['menu-block-wrapper-close'] = array('#markup' => '</div>');
   // Set visibility of advanced options.
-  foreach (array('title_link', 'follow', 'follow_parent', 'expanded', 'sort', 'parent_mlid') as $key) {
+  foreach (array('title_link', 'follow', 'follow_parent', 'show_deepest', 'expanded', 'sort', 'parent_mlid') as $key) {
     $form[$key]['#states']['visible'][':input[name=display_options]'] = array('value' => 'advanced');
   if ($config['title_link'] || $follow || $config['expanded'] || $config['sort'] || $config['parent_mlid']) {

So apply the patch as normal and then manually paste the additional line from hunk 4
+      variable_set("menu_block_{$delta}_show_deepest", $edit['show_deepest']);

function _menu_block_block_save($delta, $edit) {
  variable_set("menu_block_{$delta}_title_link", $edit['title_link']);
  variable_set("menu_block_{$delta}_admin_title", $edit['admin_title']);
  variable_set("menu_block_{$delta}_parent", $edit['parent']);
  variable_set("menu_block_{$delta}_level", $edit['level']);
  variable_set("menu_block_{$delta}_show_deepest", $edit['show_deepest']); /* new addition */
  variable_set("menu_block_{$delta}_follow", $edit['follow']);
  variable_set("menu_block_{$delta}_depth", $edit['depth']);
  variable_set("menu_block_{$delta}_expanded", $edit['expanded']);
  variable_set("menu_block_{$delta}_sort", $edit['sort']);

...and voila! I'll continue to test but early indications are good :)

Priority:Normal» Critical

Glad you like the patch.

Let's make sure this gets noticed after 3 months of just sitting in the queue.

Any way of showing siblings while keeping the Starting level to as "1st level (primary)"?

@capellic I'm not sure if I know what you mean...

Just wanted to say your code works beautifully. This should be a must have feature.

Issue summary:View changes

More typos