Hello,
I need activemenu module, because other options (dhtml menu, jquery menu) don't use Ajax and therefore don't play nice with lots of menu entries.
I ported activemenu module using the coder module and some manual fixing. I removed the dependency on the jstools module, as this was also not ported yet. But I only copied the needed functions. Probably, this could be done in a better way.
I'm not sure about the setting to alter the theme registry, as I don't seem to need it.
Anyway, the module works like it should in Drupal 7 as far as I can see.
I attach a patch (my first time using git, not sure if it's done right), and an archive of the complete d7 version for convenience of testing.
If anybody is interested, I would be glad to have some feedback and maybe this could lead to a release of activemenu for Drupal 7.
Greetings,
Alex
Comment | File | Size | Author |
---|---|---|---|
#4 | activemenu-1430534-4.patch | 3.54 KB | alexh |
activemenu-d7.tgz | 16.65 KB | alexh | |
activemenu-d7.patch | 14.81 KB | alexh |
Comments
Comment #1
nedjoThanks for the patch! I am unable to commit time to a Drupal 7 version. Are you interested in taking over as maintainer?
A couple of quick comments on the patch:
This is extraneous (comes from a patch based on a stable release rather than Git checkout).
References to jstools in code or comments shd be changed or removed.
Comment #2
B-Prod CreditAttribution: B-Prod commentedThanks for your help.
I created a new branch for 7.x development, from which you can work and make patches. This branch was created from the files you provided. I made only very few changes to your code because I do not have enough time now to work seriously on the D7 port. But I will have some availability next month to help porting the module.
Some remarks:
Comment #3
B-Prod CreditAttribution: B-Prod commentedComment #4
alexh CreditAttribution: alexh commentedThanks to you both for your comments and making a dev branch.
I moved the needed functions from jstool.js to activemenu.js, so we get a working version (patch attached). Not sure, if this might create any conflicts with other modules which previously were part of jstools?
And, ooops, I found out that it currently works only for custom menus, due to the different block-IDs in Drupal 7. The module still hard codes the prefix "#block-menu-", but this is now only true for custom menus, while others e.g. start with "#block-system-", etc.
I can look into this problem, but at the moment have no idea how to correct this.
And well, I'm not that familiar with all code as you are, but yes, I would be interested in being co-maintainer for a start.
Comment #5
B-Prod CreditAttribution: B-Prod commentedLooks good. Just one point: il is not necessary to duplicate basePath data in settings.activemenu since it already belongs to Drupal object.
Drupal.settings.basePath
So when needed in a "behavior" component (with standard declaration:
function (context, settings)
), it can be accessed through settings.basePathComment #6
logman CreditAttribution: logman commentedHello, using Ajax for menu items is an excellent idea!
I tried Active menus 7.x-2.x-dev (with alexh's activemenu-1430534-4.patch) in Drupal 7.12 - default theme.
It seems, the module does not respects indent/outdent setting via links menu administration. Active menus is also incompatible with "jQuery Update" respectively newer versions of jQuery, which is a pity because last jQuery version is very important for any other modules.
Very useful would be to compatibility of "Menu Expanded", too. For many items in menu, such functionality is always handy.
I really love this menu concept, please keep working on this project.
Thanks,
Logman
Comment #7
johncs CreditAttribution: johncs commentedToday, the released version of this module does not work. It references jstools.js which, despite the contents of its readme, is not included. Nor is there any documentation about how to install jstools using the libraries functionality. and no assurance that would work in any case.
For me, would like drop-down menus such as the one at http://js.id.au/register.php and that is done entirely in CSS. I installed this hoping I would have the menu facility I want, I don't need dynamic menus I don't imagine they will change often at all, and loading the entire menu at first glance is fine.
Comment #8
B-Prod CreditAttribution: B-Prod commentedSo you can simply use the mernu block module and make your own CSS.