1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Custom Contact URL in a New Tab Instead of in a Same Tab

Discussion in 'XenForo Questions and Support' started by Shyuan, Jun 28, 2013.

  1. Shyuan

    Shyuan Well-Known Member

    Hi,

    I put Custom URL for my Contact URL. However, I would like it to popup a new tab instead of opening the custom URL in the same tab. May I know how can I do that? Thanks. :)
     
  2. Jeremy

    Jeremy Well-Known Member

    Change the contact us link in the footer template to remove the OverlayTrigger class and add the following into the a element:
    HTML:
    target="_blank"
     
  3. Shyuan

    Shyuan Well-Known Member

    Thanks :)

    May I know is there any other way other than altering the template?
     
  4. Jeremy

    Jeremy Well-Known Member

    Not in the default system, no. In v1.2 you will be able to add a template modification to make the change automatically.
     
    Shyuan likes this.
  5. Shyuan

    Shyuan Well-Known Member

    Alright, thanks for letting me know :)
     
  6. Shyuan

    Shyuan Well-Known Member

    Hi @King Kovifor, just a question. Do I actually remove the whole thing below or just the class="OverlayTrigger"?

    Code:
    'class="OverlayTrigger" data-overlayOptions="{"fixed":false}"'
    Your advise would be much appreciated. Thanks :)
     
  7. Shyuan

    Shyuan Well-Known Member

    Sorry, but could you please highlight the exact code that I have to remove from this line? I see three "overlay" word in that line, not sure if they are all related and needed to be removed since class="OverlayTrigger" is to be removed.

    Code:
    <li class="contactLink"><a href="{$xenOptions.contactUrl.custom}" {xen:if {$xenOptions.contactUrl.overlay}, 'class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}"'} target="_blank">{xen:phrase contact_us}</a></li>
     
  8. Jeremy

    Jeremy Well-Known Member

    Are you using a custom contact URL? If so, it appears there's an option to open it in an overlay or not. Just uncheck it here:
    ACP -> Options -> Basic Board Information -> "Open this link in an overlay"

    Or remove this code in red:

    Code:
    <li class="contactLink"><a href="{$xenOptions.contactUrl.custom}" {xen:if {$xenOptions.contactUrl.overlay}, 'class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}"'} target="_blank">{xen:phrase contact_us}</a></li>
     
  9. Shyuan

    Shyuan Well-Known Member

    Alright, I got you, either way will work. But since there's the option, I will choose to untick it. I have actually disabled that option in my admin panel. I just added the target="_blank" and it's working fine. Thank you so much :)
     

Share This Page