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.

AttachmentSize
clickpath_menu_title_611.patch529 bytes

#1

coltrane - March 16, 2009 - 14:52

Good point, I'll review this soon. Thanks!

#2

raspberryman - March 18, 2009 - 21:18

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

coltrane - March 21, 2009 - 19:06
Status:needs review» needs work

#4

coltrane - May 31, 2009 - 21:49
Status:needs work» needs review

Checking if menu_item is not empty before using, else falling to drupal_get_title

AttachmentSize
clickpath-399008-title.patch 864 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.