Menu router question
Hi! I'm trying to extend the taxonomy interface so that I can attach additional information to certain terms. I'd like to do one of two things: - either make admin/content/taxonomy/edit/term be a MENU_DEFAULT_TASK, and add additional tabs such as admin/content/taxonomy/edit/term/%/info1 or - (as I can easily add a link to the form) determine how to make the menu system display the proper breadcrumb for a sub page. I'm almost there (maybe) -- that is, if I have a menu item like: $items['admin/content/taxonomy/edit/term/%/info1'] = array( 'title' => 'my title', 'access arguments' => array('permission'), 'page callback' => 'drupal_get_form', 'page arguments' => array('my_func', 5), 'type' => MENU_LOCAL_TASTK, 'tab_parent' => 'admin/content/taxonomy/edit/term/%', ); it will properly create the breadcrumb list, except that the "Edit term" link doesn't include the term id at the end, which breaks things. Is there a way to accomplish either of these? Thanks, Ricky The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Why not just do a hook_form_alter and add a fieldset to the form, as Taxonomy Image does? Have you looked at Taxonomy Enhancer or Term Fields? -- Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr. Richard Morse wrote
Hi! I'm trying to extend the taxonomy interface so that I can attach additional information to certain terms.
On Jul 10, 2009, at 4:32 PM, nan_wich@bellsouth.net wrote:
Why not just do a hook_form_alter and add a fieldset to the form, as Taxonomy Image does? Have you looked at Taxonomy Enhancer or Term Fields?
I thought of this, and it's what I probably will do, but now I'm interested to see if the menu system will do either of the other two things... :-) Ricky The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
I did something similar, changing the chatroom module so that each chat had two tabs. I used hook_menu_alter like this... /** * Implementation of hook_menu_alter(). */ function fb_chatroom_menu_alter(&$items) { if ($items['chatroom/chat/%']) { // here I make the regular menu item a callback $items['chatroom/chat/%']['type'] = MENU_CALLBACK; // here I add a tab for the regular item $items['chatroom/chat/%/all'] = array( 'title' => t('Everyone'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, ); // here I add a second tab $items['chatroom/chat/%/fb/friends'] = array( 'type' => MENU_LOCAL_TASK, 'title' => t('My Friends'), 'page callback' => 'fb_chatroom_view_chat', 'page arguments' => array('friends', 2), 'access callback' => 'fb_chatroom_access_helper', 'access arguments' => array('access chat rooms', 'friends'), ); // etc for any other changes needed.... } On Friday 10 July 2009 13:03:25 Richard Morse wrote:
Hi! I'm trying to extend the taxonomy interface so that I can attach additional information to certain terms.
I'd like to do one of two things:
- either make admin/content/taxonomy/edit/term be a MENU_DEFAULT_TASK, and add additional tabs such as admin/content/taxonomy/edit/term/%/info1
participants (3)
-
Dave Cohen -
nan_wich@bellsouth.net -
Richard Morse