Jump to content

New Window from Client Area Home


web2008

Recommended Posts

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?

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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