- App
- WoltLab Suite Filebase
How can I get "external url" links to open in a new tab/window?
edit: mod, please move this to the appropriate forum. Thanks.
How can I get "external url" links to open in a new tab/window?
edit: mod, please move this to the appropriate forum. Thanks.
There is an option to open external links in a new window under Configuration -> General.
I already applied that option, but it doesn't work with Filebase's "external url" links.
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 DMedia answer, the condition is {if $file->getLastVersion()->isExternalURL()}. On around LINE 86 of the file template, you can see this code:
<a href="{link application='filebase' controller='Download' id=$file->lastVersionID}{/link}" class="button buttonPrimary">
You need to replace that code with:
That did it! Worked perfect...thanks.
Marcel Werk It has been planned since December, when will it be implemented? I have the same problem.
Marcel Werk It has been planned since December, when will it be implemented? I have the same problem.
Most likely with the next version 5.3
Don’t have an account yet? Register yourself now and be a part of our community!