Jump to content

hobbs

Newbie
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

1 Neutral

About hobbs

  • Rank
    Junior Member
  1. hobbs

    Sidebar on Modulepage

    Hi roger55, I had the same question. I have posted my solution here: My posting needs some moderator's approval to be visible.
  2. hobbs

    Module Client Area Sidebar

    Hi, i had the same question and also didn't find an accurate answer to my question. So, I did some hacking and have managed to find a solution: function addClientAreaSidebarForCustomAddonModule($vars) { $client = Menu::context('client'); if(!empty($client)){ if(isset($vars['modulelink'])){ if(strpos($vars['modulelink'],'m=customAddonModule')){ $primarySidebar = Menu::primarySidebar(); $newMenu = $primarySidebar->addChild( 'CustomAddonModule ClientArea Sidebar', array( 'name' => 'My CustomAddonModule ClientArea Sidebar', 'label' => 'My CustomAddonModule ClientArea Sidebar', 'uri' => 'index.php?m=customAddonModule', 'order' => 100, 'icon' => 'fas fa-magic', ) ); if(!is_null($primarySidebar->getChild('My CustomAddonModule ClientArea Sidebar'))){ $primarySidebar->getChild('My CustomAddonModule ClientArea Sidebar') ->addChild('Sidebar MenuItem 1') ->setLabel('Sidebar MenuItem 1') ->setUri('index.php?m=customAddonModule') ->setOrder(10); $primarySidebar->getChild('My CustomAddonModule ClientArea Sidebar') ->addChild('Sidebar MenuItem 2') ->setLabel('Sidebar MenuItem 2') ->setUri('index.php?m=customAddonModule&p=manage_2') ->setOrder(10); } $newMenu->moveToFront(); } } } } add_hook('ClientAreaPage', 1, 'addClientAreaSidebarForCustomAddonModule'); references: https://docs.whmcs.com/Working_With_Client_Area_Home_Page_Panels#Add_a_local_temperature_panel_to_the_homepage https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareapage
  3. Just another hello to the WHMCS community from my side. Yes, I'm new here and I have started to implement an addon module for a company. I've found some good answers to my dev issues. Instead of leeching, I just want to contribute to the community here.
  4. Welcome to WHMCS.Community hobbs! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines