Enable plugins to inject content within the top navigation bar #9773

Closed
opened 2025-12-29 21:22:26 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (May 30, 2024).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v4.0.3

Feature type

New functionality

Proposed functionality

It is currently possible for a plugin to embed custom content in NetBox core views by employing one or more of the available extension methods of the PluginTemplateExtension class. This proposal would add a new method, navbar(), to enable a plugin to inject custom content within the top navigation bar, to the left of the user menu (opposite the global search bar).

This will also require slight modification to the logic for registering template extensions, which currently requires the association of an extension with a particular NetBox model.

Use case

It may be desirable for a plugin to embed a notification or control widget of some kind which persists across multiple views.

Database changes

None

External dependencies

None

Originally created by @jeremystretch on GitHub (May 30, 2024). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v4.0.3 ### Feature type New functionality ### Proposed functionality It is currently possible for a plugin to embed custom content in NetBox core views by employing one or more of the available [extension methods](https://netboxlabs.com/docs/netbox/en/stable/plugins/development/views/#extra-template-content) of the PluginTemplateExtension class. This proposal would add a new method, `navbar()`, to enable a plugin to inject custom content within the top navigation bar, to the left of the user menu (opposite the global search bar). This will also require slight modification to the logic for [registering template extensions](https://github.com/netbox-community/netbox/blob/05c69f84e69ac4ea8197452a75837e07d032993f/netbox/netbox/plugins/registration.py#L35), which currently requires the association of an extension with a particular NetBox model. ### Use case It may be desirable for a plugin to embed a notification or control widget of some kind which persists across multiple views. ### Database changes None ### External dependencies None
adam added the status: acceptedtype: featurecomplexity: low labels 2025-12-29 21:22:26 +01:00
adam closed this issue 2025-12-29 21:22:26 +01:00
Author
Owner

@PieterL75 commented on GitHub (May 31, 2024):

Funny, we had a discussion in the #netbox-plugin-development on this :-)
There was the question what the best way is to inject CSS or JS.
BOTTOM_BANNER was the best solution for now.

So can we extend this FR to include a mean to inject something like CSS and JS ?
Or should we open another FR for this

@PieterL75 commented on GitHub (May 31, 2024): Funny, we had a discussion in the #netbox-plugin-development on this :-) There was the question what the best way is to inject CSS or JS. BOTTOM_BANNER was the best solution for now. So can we extend this FR to include a mean to inject something like CSS and JS ? Or should we open another FR for this
Author
Owner

@jeremystretch commented on GitHub (May 31, 2024):

@PieterL75 what would not be in scope for this FR.

@jeremystretch commented on GitHub (May 31, 2024): @PieterL75 what would not be in scope for this FR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9773