Zen Cart Logo
Forums / General Questions / Adding new link to Admin Navbar

Adding new link to Admin Navbar

Views: 2,258

Results 1 to 9 of 9
26 Aug 2025, 8:00 PM
#1
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Adding new link to Admin Navbar

Is there a guide on how to add custom links to the navbar in the admin area?

In this portion here, I tried to modify the header_navigation.php file but my change doesn't seem to come through?

26 Aug 2025, 8:30 PM
#2
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

Re: Adding new link to Admin Navbar

Use
$zco_notifier->notify('NOTIFY_ADMIN_HEADER_UPPERMENU', $upperMenuArray, $upperMenuOverrideArray);

If you are not familiar with notifer-observers, get familiar. You won't look back.

26 Aug 2025, 8:33 PM
#3
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Adding new link to Admin Navbar

torvista:

Use
$zco_notifier->notify('NOTIFY_ADMIN_HEADER_UPPERMENU', $upperMenuArray, $upperMenuOverrideArray);

If you are not familiar with notifer-observers, get familiar. You won't look back.

Any particular event should I attach it to?

26 Aug 2025, 8:45 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: Adding new link to Admin Navbar

retched:

Any particular event should I attach it to?
Er, NOTIFY_ADMIN_HEADER_UPPERMENU, which is issued by admin/includes/header.php

27 Aug 2025, 7:39 AM
#5
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

Re: Adding new link to Admin Navbar

Here is an example of use:

https://gist.github.com/torvista/1e6d153a83e01b7ae1d438a5ae3d0e49

which I use to make the "Storefront" link go to the product or category that is currently being viewed in the admin.

Caveat Emptor

27 Aug 2025, 9:34 AM
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,710
Plugin Contributions:
56

Re: Adding new link to Admin Navbar

Bear in mind that this is a new unreleased notifier, so you'll have to pull in admin/includes/header.php from Github.

A nice improvement coming to a Zen Cart release soon!

27 Aug 2025, 5:39 PM
#7
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,874
Plugin Contributions:
7

Re: Adding new link to Admin Navbar

this is a new unreleased notifier

Oops sorry, I forget I'm on the bleeding edge.

27 Aug 2025, 6:54 PM
#8
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,710
Plugin Contributions:
56

Re: Adding new link to Admin Navbar

Thank you for helping us test the bleeding edge! This makes it more likely that when we do release, it will be of better quality.

27 Aug 2025, 10:52 PM
#9
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Adding new link to Admin Navbar

swguy:

Bear in mind that this is a new unreleased notifier, so you'll have to pull in admin/includes/header.php from Github.

A nice improvement coming to a Zen Cart release soon!

Oh, okay, so I wasn't crazy. I ended up pulling it from the main branch when I didn't see it in the notifier report in the documentation. Managed to get this to work relatively easily with the observer.