Problem/Motivation

I had to make work a menu block instance which had menu links that were only different by a given parameter ($_GET). This module doesn't check for the parameters by default, that's why if you're on /a-page?id=111 its corresponding item menu won't be highlighted, instead all links /a-page?id=... will be highlighted.

Proposed resolution

To make it work, I hardcoded the parameter I'm using in menu_block_tree_output() (menu_block.module) by adding a condition :

<?php
   
if ($data['link']['href'] == $_GET['q'] || ($data['link']['href'] == '<front>' && drupal_is_front_page())) {
       
# Added condition checking for the parameter I'm using
       
if(!isset($_GET['id']) || (isset($_GET['id']) && strstr(($items[$key]['link']['options']['query'], 'liste_type='.$_GET['id'])))
         
$class[] = 'active';
    }
?>

This can be easily scaled by checking for every $_GET.