Hi all,
Comment in CMenu.php’s line 304 says: “Note that the GET parameters not specified in the ‘url’ option will be ignored”. Is there an easy workaround for this?
I have a menu, where I have options for showing items by type and showing all items. It looks like this:
Array
(
[0] => Array
(
[label] => Show videos
[url] => Array
(
[0] => /content/manage/index
[type] => 1
)
)
[1] => Array
(
[label] => Show audios
[url] => Array
(
[0] => /content/manage/index
[type] => 2
)
)
[2] => Array
(
[label] => Show texts
[url] => Array
(
[0] => /content/manage/index
[type] => 3
)
)
[3] => Array
(
[label] => Show all
[url] => Array
(
[0] => /content/manage/index
)
)
)
As you can see, first three items has extra GET parameter specified, while last one doesn’t have it.
Current CMenu’s implementation ignores that and whenever I select any of first three items, my menu contains two active (highlighted) items – currently selected and the last one (as in case of last one, current route’s GET parameters part is ignored, so it matches as well).
The only solution I found up until now, is to add extra GET parameter to last option, for example [type] => 3 or [type] => ‘all’ and ignore it in the Controller. But this isn’t an option in my current project.
Does anyone has any other idea, how to workaround this problem?