I noticed that the header above the navigation menu is titled "Navigation". Is there any way to change this to the user's username, like the standard, non-DHTML navigation menu has?

If I can do this myself, I'd be happy to make the change somewhere. I just know know where, other than in the code. If there is a way that it can be done, please let me know, and I'll make the change myself.

Thanks!

Comments

Wuk’s picture

Status: Active » Needs review
StatusFileSize
new731 bytes

Maybe there is a better way to do this, but it is working for me.

mine@subnet142.com’s picture

Hi, the patch works for me. Many thanks. However, will it be merged to the module soon? (Sorry for my ignorance of the code review/merge practice of the Drupal teams.)

dmetzcher’s picture

I actually like the fact that it's named "Navigation" now. I added a new block with some user account features in it, and the name of the user currently logged in is displayed in my new block. Is it possible, when you release the next version, that you make it configurable so that we can choose to make the block title the username OR something else (like "Navigation") that we pick ourselves?

merlinofchaos’s picture

I think this probably should be a setting. Maybe our new DHTML Menu helper guy will be able to implement a setting for this.

cburschka’s picture

Version: 5.x-0.7 » 5.x-0.x-dev
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1 KB

Blocks can already get arbitrary static names through the block settings. In fact, I did this for my normal Navigation menu before installing this, since I don't like the username there either. This module could title its navigation block the same as as menu.module does, without duplicating the options of the block interface.

In fact, since the DHTML Menu block is meant to replace the existing menu blocks, this would improve consistency.

Rerolling this patch against HEAD without modification and setting as RTBC. I think this can go in soon, unless you have any objections, merlin?

cburschka’s picture

StatusFileSize
new1.02 KB

Ouch! My first patch, and I nearly missed a bug. But I didn't.

When you're logged out, the normal Navigation menu is titled "Navigation". The last version of this patch removes the title of the DHTML Menu when you're logged out.

This patch adds an extra check for $user->uid > 0 before trying to use the username.

cburschka’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD and DRUPAL-5.

Anonymous’s picture

Status: Fixed » Closed (fixed)