Hi all,
I have written a small add-on that simply adds a "Create Content" tab with a drop-down list of all available node types under it. This is a solution to the lack of "Create Content" links in the Drupal 7, 3.0 version of the Admin Menu module. Before rendering, it checks 'create' permissions for each node type. It is quite rough but has turned out to be handy on the several 7.x dev sites I'm currently using.
I am in need of feedback from the community, though, on whether something like this is the best route to take. Issues include:
1: My module puts "Create" in its own top-level tab, although it might be better to have it as a sub-tab under the "Content" tab. I'm not sure how to do this, though.
2: Should this issue be fixed, instead, by allowing the site admin to choose which menu(s) should be used in Admin Menu (since in Drupal 7, "Navigation" and "Management" are 2 separate menus)?
3: Are there bigger issues/changes going on that I am missing? It could be that a general discussion has happened (or will happen) regarding the 'best practices' for administration in Drupal 7.
That said, if others are interested, I have every intention of sharing this module. I have attached a screenshot of what this module does.
Nathan Eanes
visuaLATTE
Pittsburgh, PA USA
| Comment | File | Size | Author |
|---|---|---|---|
| admin-menu.jpg | 57.28 KB | visuaLatte |
Comments
Comment #1
sunIs this a duplicate of #502500: Re-add Create content ?
Comment #2
dgastudio commentedboth topics are speaking about the same. but in this one, nateeanes provides a working solution.
Comment #3
sylv3st3r commented+1 Subscribe
Comment #4
visuaLatte commentedThis issue is slightly different than the previous one, because it refers to the Drupal 7.x version. The issue, as it appears to me, is that in Drupal 7.x the 'Create Content' links are no longer part of the main 'Management' menu (from which Admin Menu pulls its list of links). This module uses the
hook_admin_menu_output_alter()function rather than actually using hook_menu() to add these links to the 'Management' menu.This module is rough and contains issues (or brings up questions):
1: It allows the list of content types to be cached, meaning that if an administrator adds/removes content type permission from a user role, he/she has to clear the cache before that content type appears/disappears from the list. (Is this a problem, or is it a good thing because on the whole it improves performance?
2: Should 'Create Content' be a top-level menu item, or should it be nested under the 'Content' tab? Admin Menu 7.x-3.x has more top-level tabs than Drupal 6 did, so I don't want to clutter things. Also, the 7.x-3.x version has 2 tabs, 'Tasks' and 'Index', which on my sites have no links under them. Sun, do you know what they are for?
Nathan
Comment #5
dgastudio commented1. good thing
2. under content.
Comment #6
sun#1025582: Custom db_select 'conditions' parameter for menu_build_tree()
Comment #7
visuaLatte commentedSun: Thanks-- so I'll hold off on this for now, and assume D7 core will allow you to add these links to the Admin Menu module itself?
Nathan
Comment #8
sunyes, that's the plan. Hopefully aforementioned core patch lands for D7.1, so it gets easy.
Essentially, this is a duplicate of #502500: Re-add Create content
Comment #9
visuaLatte commented10-4. Thanks for your responses!