Use menu_get_item() instead of drupal_get_title()
raspberryman - March 11, 2009 - 22:19
| Project: | Clickpath |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
menu_get_item() will show the title of local tasks, whereas drupal_get_title does not. This was desired functionality for a recent project, and I'd be interested in seeing if it is desired for others as well.
| Attachment | Size |
|---|---|
| clickpath_menu_title_611.patch | 529 bytes |

#1
Good point, I'll review this soon. Thanks!
#2
Just realized drupal_get_title() should be used as a backup to menu_get_item(), since many pages will not have router items. I'll submit a patch soon.
#3
#4
Checking if menu_item is not empty before using, else falling to drupal_get_title