Open external url in a new tab/window

  • I see. I do not have access to the filebase, but there should be a template called "file" or something which you can edit.

    You have to find the part that looks like this:

    <a href="{FILEBASE CONTROLLER STUFF}" class="button buttonPrimary">

    and change it to something like:

    <a href="{FILEBASE CONTROLLER STUFF}" class="button buttonPrimary" {if EXTERNALURL}target="_blank"{/if}>


    {FILEBASE CONTROLLER STUFF} is the link/file/download definition which i don't know how it looks like.

    {if EXTERNALURL} must be replaced with the correct if-statement which should also be somewhere below these lines since the template changes if its an external URL download.

  • In addition to IceQ1337 answer, the condition is {if $file->getLastVersion()->isExternalURL()}. On around LINE 86 of the file template, you can see this code:

    HTML
    1. <a href="{link application='filebase' controller='Download' id=$file->lastVersionID}{/link}" class="button buttonPrimary">

    You need to replace that code with:

    HTML
    1. <a href="{link application='filebase' controller='Download' id=$file->lastVersionID}{/link}" class="button buttonPrimary"{if $file->getLastVersion()->isExternalURL()} target="_blank"{/if}>