Jump to content

Add a tertiary navbar using hooks


Recommended Posts

2 hours ago, DennisMidjord said:

We need to make a tertiary navbar in WHMCS for users that are logged in. Is there any way to do this?

nice use of the word tertiary. 🙂

the problem is what do you mean by it - do you mean a 3 level navbar, e.g parent -> child -> grandchild megamenu, or a third different navbar for logged in users ???

Link to comment
Share on other sites

3 minutes ago, brian! said:

nice use of the word tertiary. 🙂

Thanks! 😉

4 minutes ago, brian! said:

the problem is what do you mean by it

I actually mean a third navbar (like $primaryNavbar and $secondaryNavbar). I've also tried to achieve "grandchild" menu for the primary navbar before (for another project), but gave up.

Link to comment
Share on other sites

1 hour ago, DennisMidjord said:

I actually mean a third navbar (like $primaryNavbar and $secondaryNavbar).

hmmm... reference to primary & secondary navbar creation will be hardcoded, so whether you could easily add a tertiary option, I don't know as I haven't tried... but instinctively, it feels doable. - fundamentally, it's just n array that you're looping through.

the good news is that WHMCS didn't write the core menu code, it based on code from a GitHub.

 whether you could cheat, create a sidebar, but output it as a third navbar I think would be doable - i've certainly posted code previously that outputted a sidebar as a navbar (or maybe the other way around).

2 hours ago, DennisMidjord said:

I've also tried to achieve "grandchild" menu for the primary navbar before (for another project), but gave up.

that's the spirit. 🙂

you'd certainly need to alter the navbar.tpl template, but whether the array can handle more than 2 levels itself, I don't know... I think I played with that years ago, got nowhere and gave up.

you can fake it using "Advanced Menu Manager" from Marketplace

mKwUwuC.png

it fakes it by creating a CSS menu that looks the same as the default Six navbar, but allows multiple levels... whether you can go beyond 3 levels, I don't know as I never tried... but as you can see from the screenshot, you can certainly use it to add grandchild links.

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