Page 1 of 1

[closed] Admin menu items

Posted: Thu Sep 04, 2014 1:36 pm
by kristoftorfs
Hi,

I'm having an issue with the admin menu items. I have a couple of menu items in my module which all redirect to the same module action, but with a different parameter.

Let's take the following menu items as an example:
  1. action=myaction,myparam=firstparam
  2. action=myaction,myparam=secondparam
  3. action=myaction,myparam=thirdparam
  4. action=myaction,myparam=fourthparam
Now when I open for example the third menu item, the first one is highlighted as active, as this is the first one for this action and thus marked as active.

When finding the active menu item, the admin theme should also check the parameters, not only the action.

Re: Admin menu items

Posted: Thu Sep 04, 2014 3:07 pm
by calguy1000
yeah we probably won't be fixing this. Multiple admin menu items for the same module must go to different actions.

Re: Admin menu items

Posted: Thu Sep 04, 2014 3:09 pm
by kristoftorfs
Can i fix this myself, and pass the changes on to you for revision? If I have to make changes to the CMS itself, I would prefer they would end up in the official release.

Re: Admin menu items

Posted: Thu Sep 04, 2014 5:37 pm
by Rolf
Thanks for testing, kristoftorfs

Please email me your suggested code changes and we will see if we can implement this. I can't promise it will be in the 2.0 release, might be in a later release... It depends on the impact on the existing code (possibility to break some other functions).

Grtz. Rolf

Re: Admin menu items

Posted: Thu Sep 04, 2014 5:56 pm
by kristoftorfs
Okay, I'll get started on it tomorrow. Might take me a few days as these are pretty pretty busy times for me.

At first glance the changes shouldn't be too evasive as I simply plan to simply expand the functionality of the CmsAdminMenuItem class.

Should I notify you in this post when I'm done, or some other way?

Re: Admin menu items

Posted: Thu Sep 04, 2014 6:00 pm
by Rolf
You can reach me at rolf@the-domain-name-above-in-your-browser ^ ;)

Re: [open] Admin menu items

Posted: Mon Sep 22, 2014 6:01 am
by kristoftorfs
I've been looking into this, but it seems that the way the admin menu system currently works, it is nearly impossible to get this working without altering too much of the existing code.

Guess I'll just have to rewrite my module to use different actions somehow.