web2008 Posted June 19, 2016 Share Posted June 19, 2016 I use the example code for specialOfferPanel.php on http://docs.whmcs.com/Working_With_Client_Area_Home_Page_Panels but I can`t find out how I can open the URL in a new window ( target="_blank" ). I asked WHMCS Support and I get the following answer: At the current theme, this is not possible. We don't have a conditional to allow setting the target link when we render that page. Since the template for clientareahome.tpl actually controls how the panels are described, this is something that could be done with a custom template + hook control. If you add a btn-target field to the extra array and then included something like: {if $item->hasExtra('btn-target')} target="{$item->getExtra('btn-target')}" {/if} In the right part of line 83 of the template, it may work. Does anyone have an idea on how this can be resolved? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted June 19, 2016 Share Posted June 19, 2016 I see that they provide the solution already open /templates/six/clientareahome.tpl file, line #83 is something like that: <a href="{$item->getExtra('btn-link')}" class="btn btn-default bg-color-{$item->getExtra('color')} btn-xs"> you need to replace it with: <a href="{$item->getExtra('btn-link')}" class="btn btn-default bg-color-{$item->getExtra('color')} btn-xs"{if $item->getExtra('btn-target')} target="{$item->getExtra('btn-target')}"{/if}> now in "specialOfferPanel.php" file you need to specify the "btn-target", right after "btn-icon": 'btn-icon' => 'fa-arrow-right', 'btn-target' => "_blank" 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted June 19, 2016 Author Share Posted June 19, 2016 Thank you, now it works perfectly! 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.