Jump to content

HOOK - How to use target='_blank' ???


Recommended Posts

The silly documentaion doesn't talk about this and many other questions, which have to be asked here, on the forums and are bothering other members, just because of the poor documentation.

 

It has been asked xx times here like below, but in the documentation you won't find the answer:

 

https://forum.whmcs.com/showthread.php?105202-v6-02-Menu-How-to-add-Link-Target-Attribute&p=433370#post433370

Link to comment
Share on other sites

OMG!!! After hours of serching here is the right syntax for hooks in WHMCS 7 and higher:

 

[color=#000000][color=#FF8000]// Add a Facebook link to the panel.
[/color][color=#0000BB]$socialMediaPanel[/color][color=#007700]->[/color][color=#0000BB]addChild[/color][color=#007700]([/color][color=#DD0000]'facebook-link'[/color][color=#007700], array(
[/color][color=#DD0000]'uri' [/color][color=#007700]=> [/color][color=#0000BB]Lang[/color][color=#007700]::[/color][color=#0000BB]trans[/color][color=#007700]([/color][color=#DD0000]'facebookurl'[/color][color=#007700]),
[/color][color=#DD0000]'label' [/color][color=#007700]=> [/color][color=#DD0000]'Like us on Facebook!'[/color][color=#007700],
[/color][color=#DD0000]'order' [/color][color=#007700]=> [/color][color=#0000BB]1[/color][color=#007700],
[/color][color=#DD0000]'icon' [/color][color=#007700]=> [/color][color=#DD0000]'fa-facebook'[/color][color=#007700],
))
->[/color][color=#0000BB]setAttribute[/color][color=#007700]([/color][color=#DD0000]"target"[/color][color=#007700], [/color][color=#DD0000]"_blank"[/color][color=#007700]);[/color][/color]

 

Thanks @brian!

 

https://forum.whmcs.com/showthread.php?103006-navbar-addChild-uri-target&p=446758#post446758

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.

×
×
  • 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