This topic is locked

Adding Badges to the Menu

10/20/2025 17:36:46
PHPRunner General questions
D
druck281 author

There is an old Blog post from 2016 that discussed using ModifyMenuItem to add dynamic images, text, etc to menu items. Since this event is now deprecated, are we still able to add custom HTML in the newer ModifyMenu event? I am basically trying to add the user's profile pic and name at the top of the menu like in the screenshot. It seems logical for this to be a menu item that is linked to the User Profile page but I don't know that the addPageLink or addURL methods accept HTML. If it does, I was planning to look up the image file and add an <img> tag.

I was able to add a static image using the icon field in the standard menu editor but I don't know how I could make that dynamic.

Thanks!

img alt

D
druck281 author 10/20/2025

I forgot to link the original blog post.