plusplushosting Posted May 28, 2017 Share Posted May 28, 2017 Hi there, im finding info about how to change the side menu items names, add new links, etc. but im not finding the menu code so i can add it in a panel in the body...i simply wish to add the "Change password" link when you are in a cpanel hosting area in the Product panel. Can someone please provide me this information? Thanx in advance! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 28, 2017 Share Posted May 28, 2017 isn't there already a link there by default ? or are you suggesting that you want to move it somewhere else? 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted May 28, 2017 Author Share Posted May 28, 2017 Hi Brian, yes i wish to add the link in the package panel in the body of the same page...attached a screen. Thanx! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 28, 2017 Share Posted May 28, 2017 Hi, http://docs.whmcs.com/Working_with_Module_Templates For example, in the case of the provisioning module "cpanel", /modules/servers/cpanel/overview.tpl could be customised by creating the following template file: /templates/yourtemplatename/modules/servers/cpanel/overview.tpl that's the template you're going to want to edit to do this - i'd recommend copying the above template to your custom template as described in the docs... otherwise any changes you make today might get overwritten by a future WHMCS update. <p> <a href="http://{$domain}" class="btn btn-default btn-sm" target="_blank">{$LANG.visitwebsite}</a> {if $domainId} <a href="clientarea.php?action=domaindetails&id={$domainId}" class="btn btn-success btn-sm" target="_blank">{$LANG.managedomain}</a> {/if} <input type="button" onclick="popupWindow('whois.php?domain={$domain}','whois',650,420);return false;" value="{$LANG.whoisinfo}" class="btn btn-info btn-sm" /> {if $module eq "cpanel"} <a href="#tabChangepw" class="btn btn-danger btn-sm" data-toggle="tab">{$LANG.serverchangepassword}</a> {/if} </p> most of that block of code is already there in the template, what i've added is that final <a href> line to add a button to change the password... you might need to tweak the layout slightly as you would run into an issue if you could manage the domain and thus have four buttons... <p> <a href="http://{$domain}" class="btn btn-default btn-sm" target="_blank">{$LANG.visitwebsite}</a> {if $domainId} <a href="clientarea.php?action=domaindetails&id={$domainId}" class="btn btn-success btn-sm" target="_blank">{$LANG.managedomain}</a> {/if} </p> <p> <input type="button" onclick="popupWindow('whois.php?domain={$domain}','whois',650,420);return false;" value="{$LANG.whoisinfo}" class="btn btn-info btn-sm" /> {if $module eq "cpanel"} <a href="#tabChangepw" class="btn btn-danger btn-sm" data-toggle="tab">{$LANG.serverchangepassword}</a> {/if} </p> 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted May 28, 2017 Author Share Posted May 28, 2017 Thanx very much! Just a last question, is there any way to pass a variable so when you click in the Change password button the side menu highlight the Change password field? As is when you click in the change password button (in the code above) keep highlighting the Information link/row in the side menu. Thanx again! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 29, 2017 Share Posted May 29, 2017 Thanx very much! Just a last question, is there any way to pass a variable so when you click in the Change password button the side menu highlight the Change password field? As is when you click in the change password button (in the code above) keep highlighting the Information link/row in the side menu. interesting question - i'm tempted to think not because the whole page isn't refreshing, it's merely referencing a tab change. it would work (re active sidebar link) if you linked the button to open in a new tab/window... <a href="#tabChangepw" class="btn btn-danger btn-sm" target="_blank">{$LANG.serverchangepassword}</a> so it might be a case of deciding which you prefer - highlighting the sidebar or opening the change password link in the existing tab. 0 Quote Link to comment Share on other sites More sharing options...
plusplushosting Posted May 30, 2017 Author Share Posted May 30, 2017 Thanx again Brian! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.