Jump to content

Adding title attribute to admin area main navigation dropdown menu links


Recommended Posts

Hello everybody

We have some Addons Modules that have a little bit longer than usual names, so the names will not show in full because the dropdown menu max width is set to 200px.

If I override the dropdown menu width in my admin area custom css file another problem shows up.

So the only thing I can think of is using a hook to add a title attribute to the dropdown menu links.

I don't know if this is possible because I can't find a way to hunt the admin area dropdown menu links items and add the title attribute to it.

Change all admin nav dropdown menu links from:
<a id="Menu-Link-Title" href="#">Link Title</a>
To this:
<a id="Menu-Link-Title" href="#" title="Link Title">Link Title</a>

*The attached images are just an example from WHMCS default admin area navigation dropdown menu link to explain a simple problem and a simple solution.

Need to change this:

image.png.2481cdc2e6facadcb437faba0083c0bf.png

To become like this:

image.png.20b6788391c76948976e7ccd9884ab09.png

 

Thank you

Link to comment
Share on other sites

I forgot that we have admin templates 🙂

So no hook or something like that is needed, I just need to edit: whmcs\admin\templates\blend\nav.tpl

<li><a id="Menu-Addons-{$displayname}" href="addonmodules.php?module={$module}">{$displayname}</a></li>
to
<li><a id="Menu-Addons-{$displayname}" href="addonmodules.php?module={$module}" title="{$displayname}">{$displayname}</a></li>

Thank you

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