Jump to content

quyu.net

Retired Forum Member
  • Posts

    1
  • Joined

  • Last visited

Everything posted by quyu.net

  1. because sometimes events need to be triggered by JavaScript, and seturi() can only set URI, it will automatically add a "/" in front of it, cause JavaScript event code cannot be added. Documents: https://docs.whmcs.com/Editing_Client_Area_Menus#Hooks example code: use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('My Domains Status Filter'))) { $primarySidebar->getChild('My Domains Status Filter') ->addChild('Other Status') ->setLabel('Other Status') ->setUri("javascript:clickLeft('otherstatus')") ->setIcon('fa-globe') ->setOrder(50); } }); Is there a better way to add a JavaScript triggered sidebar menu?
×
×
  • 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