Jump to content

Is it possible to add menuitem in the Admin navigatebar and admin sidebar? 


malin

Recommended Posts

I want to add menuitem in admin navigator. 

I only find I can add menuitem in client navigator, 

such as this example method:

add_hook('ClientAreaPrimaryNavbar', 1, function($primaryNavbar) {

 

But is it possible to add menuitem in the Admin navigatebar? 

 

 

 

Edited by malin
Link to comment
Share on other sites

3 minutes ago, DennisHermannsen said:

Not through hooks, I would guess. The menuitems and sidebaritems has been hardcoded into the template.

theoretically, I think you could use a hook (via JS) but it wouldn't be worth the hassle - as you say, it's simpler to just edit the template. 🙂

 

Link to comment
Share on other sites

2 hours ago, DennisHermannsen said:

Make a copy of the admin area, edit the templates that you need and manually update the template when there's updates to the original template. You won't lose anything.

i'm not a big fan of doing that unless you're making wholesale changes to the admin theme - if it's just a couple of tweaks to the templates, e.g sidebar and menu, then i'd just keep backup copies of them and then replace carefully after an update.

10 hours ago, bear said:

Interesting. WHMCS gets us using hooks for everything having to do with menus in order to survive updating...except here. This means it won't survive updates unless steps are taken. Consistency would be helpful. 

I can't see anything changing in v7.9, so v8 will be when things might change.... though that's always a double-edged sword, as when WHMCS try to update the code and makes changes, that's when things go (more) wrong. 🙄

plus don't encourage them to make the admin menu hookable.... a more pressing priority might be for us to have a whip-round to buy the dev team a book for Christmas on adding proper IDs and names to elements... that at least would be a small step forward. 🎄🎁

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated