I am using Drupal 5.1 and the Zen theme. Menu-trim seems ideal for what I need, to "trim the menu" to only the active part. It does this just fine -- for text.

However, I also need to replace the top level menu item with an image. In http://drupal.org/node/110199, there is discussion on how to do this for regular menus. I tried to insert the code as shown for rewriting both the phptemplate_menu_item_link and phptemplate_menu_links. Zen displays the primary links menu in the header of the page. The image is displayed as I expected in the header, and is displayed in the left column as long as the menu is not trimmed. When the menu is trimmed, the <img ... > tag is displayed as text rather than being displayed as the image.

I expect this is due to something in menu_trim altering the way that the menu_item_link is displayed, and I can't find that code in the module.

Can you point me to where in the menu_trim module the menu item is realized so that I could attempt to fix its display to comply with the other displays?

Thanks,
Bill D

Comments

DynV’s picture

Status: Active » Closed (works as designed)

The generation is in the hook_block(), in this case function menu_trim_block( ... However I doubt the core module would support such a feature but you're welcomed to make a patch and eventually make a contributed module out of it. As it's not in the goal of the module, I will close (by design) this issue but will gladly reopen it once someone submit a patch about it.

DynV’s picture

Assigned: Unassigned » DynV