Re: [feature] Would it be useful to have a way to hook into the menu edit form?
Good point. I had not got that far yet. My first concern was to find a way to allow each module (or core for that matter) define their icon file name and location. You will obviouslly need a way to theme it once you have it in the menu structure and want to display it. Like I said, I hope to be trying this soon so we'll see how it goes. On 1/9/06, markus_petrux <development@drupal.org> wrote:
Issue status update for http://drupal.org/node/42493 Post a follow up: http://drupal.org/project/comments/add/42493
Project: Drupal Version: cvs Component: menu system Category: feature requests Priority: normal Assigned to: Anonymous Reported by: markus_petrux Updated by: markus_petrux Status: active
Looks good, but how would you pass the icon to the theme function (theme_menu_item). Creating a new function menu_item_icon (similar to menu_item_link) ?
markus_petrux
Previous comments: ------------------------------------------------------------------------
Wed, 28 Dec 2005 03:03:16 +0000 : markus_petrux
I ame across this idea when thinking of a way to assign icons to menu items. Maybe it could be done with a module, but that's not easy because it is not possible to hook into the menu item form.
...or is there an easier way?
Thanks
------------------------------------------------------------------------
Mon, 09 Jan 2006 18:29:53 +0000 : Eglish
We want 4.7 out the door ASAP, i'm changing this to a feature request for cvs not 4.7.0-beta2.
------------------------------------------------------------------------
Mon, 09 Jan 2006 19:08:43 +0000 : der
I had an email discussion with the menu maintainer several weeks ago on this topic. And he confirmed that it should be as easy as adding an 'icon' field to the menu structure in the existing menu hook. In other words, he didn't think there would be any changes in core. I have not yet tried this myself but I plan to give it a shot soon. Here's what the hook code would look like.
$items[] = array( 'path' => 'admin/user/create', 'title' => t('add user'), 'callback' => 'user_admin', 'access' => $admin_access, 'icon' => 'actions/contact-new.png', 'type' => MENU_LOCAL_TASK);
participants (1)
-
David Reed