Jump to content

Actions menu.. How to edit the links


joomjump

Recommended Posts

Hello

 

Does anyone know how to edit the Actions menu under product details page, in the six template where it says login into Cpanel please?

 

actionsmneu.JPG

 

I've looked everywhere and can not seem to find it, The way I have setup the packages is where the user will only need access to a site builder.

 

I would be grateful for any help

 

Thanks

Mark

Link to comment
Share on other sites

Mark,

 

these sidebars are controlled by action hooks - http://docs.whmcs.com/Client_Area_Sidebars_Cheatsheet

 

if you wanted to remove it entirely, you'll need to add a file to includes/hooks, call it "actionsidebar.php" (or anything u like!), and add the following code to it...

 

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar)
{
   if (!is_null($primarySidebar->getChild('Service Details Actions'))) {
            $primarySidebar->removeChild('Service Details Actions');
   }
});

if you just want to edit parts of it, then the cheatsheet should help - but there have been numerous example hooks posted in the forum that are more likely to work! :)

Link to comment
Share on other sites

there isn't a file to edit - you need to use an action hook....

 

<?php 

use WHMCS\View\Menu\Item as MenuItem; 

add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) 
{ 
 if (!is_null($primarySidebar->getChild('Service Details Actions')) { 
       $primarySidebar->getChild('Service Details Actions')
                      ->removeChild('Login to cPanel'); 
  }
});

Link to comment
Share on other sites

there isn't a file to edit - you need to use an action hook....

 

<?php 

use WHMCS\View\Menu\Item as MenuItem; 

add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) 
{ 
 if (!is_null($primarySidebar->getChild('Service Details Actions')) { 
       $primarySidebar->getChild('Service Details Actions')
                      ->removeChild('Login to cPanel'); 
  }
});

 

When I add this to includes/hooks and named the php file action.php and pasted the code into the file and the entire WHMCS system has a 500 internal server error, so I have removed it again and everything works.

 

So I'm still not any closer to removing this one link

 

thank you

mark

Link to comment
Share on other sites

Mark,

 

it works fine on my v6 dev - no issues at all... but it looks like I missed a bracket out when pasting... try the code below

 

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar)
{
   if (!is_null($primarySidebar->getChild('Service Details Actions'))) {
            $primarySidebar->getChild('Service Details Actions')
                           ->removeChild('Login to cPanel'); 
   }
});

1nkDJQ4.png

Link to comment
Share on other sites

  • 2 years later...

I have the same issue. Can I change the cpanel login url instead of removing it? My hosting account doesn't have root access privilege. So I want to change the cPanel login link url to "customerdomain/cpanel" can I do that?

Link to comment
Share on other sites

19 hours ago, sha said:

I have the same issue. Can I change the cpanel login url instead of removing it? My hosting account doesn't have root access privilege. So I want to change the cPanel login link url to "customerdomain/cpanel" can I do that?

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • 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