I'm trying to centralize all module settings with administration module.
Right now, stuff is kind of all over the place:
Some modules configure settings under administer >> module name (ex: forums, localization, etc.)
Some modules configure settings under administer >> settings >> module name (ex: throttle, administration)
And others have stuff in both (aggregator, image, eventfinder)
So I'm trying to do the following:
1. Setup a menu item to sadmin/modules called "Configure module settings"
2. Make that link to a "jump-off" page, which displays an alphabetical list of all modules, with links to their settings pages (I think this is just a matter of adding a callback to the menu item)
3. Generates paths to each module's settings pages.. or, in the case of modules with more than one settings page,
4. Ideally, does not duplicate menu items which are already specified in other places in the .inc file (for example, admin/help, admin/node, admin/content)
5. I do _not_ want to hijack/break the default admin/settings path, which should take you to general site settings. Nor do I want all of the module links which would normally appear under the "settings" tree to appear under there, but rather under the "configure modules" link.
6. I'm not sure what to do about those "double-settings" modules; make a "configure" and a "settings" link separately?
Here's a very bare-bones mockup of how it might work 'in theory': http://testbed.webchick.net/module-mockup.bmp
Any pointers on where to start? I'm thinking that getting a list of settings paths shouldn't be too hard (I can loop through the menu array and pull these out), but am kind of stuck on some of the rest. :\
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | civicspace.inc_0.patch | 2.72 KB | webchick |
Comments
Comment #1
webchickHere's how far I've got so far:
1. In the sadmin/features section, added the item:
2. At the very bottom of the _administration_menu_config() function, right before returning $config, I've placed the following:
3. I've declared a move_modules function, as follows:
This 'works', in that it's adding the paths to all the module settings pages to the right place. But doesn't work because no sub-menus show up when I click on the 'configure modules' item. :(
Any ideas?
Comment #2
webchickHere is a patch against the modules/zadministration/civcspace.inc file which adds in what i have figured out so far.
Problems:
1. sadmin/modules needs a "real" callback; I just put the current one there as a placeholder so that it would show up in the menu.
2. None of the menu items actually show up as child items under "configure modules" ;( I thought _administration_reparent_menu_item would do this for me, but it doesn't look like it is.
Comment #3
webchick