Downloads in new Tab / Window

For Documents that can be viewed with the Browser (e.g PDF files), it might be appropriate to present them in a new browser tab.

You can set the behavior of the download links for each template.

Goto WP-Filebase Pro -> Manage Templates -> Files and edit for example the FIlebrowser template, which is by default:

%file_small_icon% <a href="%file_url%" title="Download %file_display_name%">%file_display_name%</a> (%file_size%)

Add the HTML attribute target=”_blank”:

%file_small_icon% <a href="%file_url%" target="_blank" title="Download %file_display_name%">%file_display_name%</a> (%file_size%)

You can do this for every template, just look for <a href="%file_url%" and replace it with <a href="%file_url%" target="_blank"


VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
Downloads in new Tab / Window, 5.0 out of 5 based on 1 rating

7 thoughts on “Downloads in new Tab / Window

  1. VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    How do you open a document in a new window when using “File URL”?

  2. Fabian says:
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Hi Chris,
    use this code:
    <a href="[wpfilebase tag=fileurl id={file_id} /]" target="_blank">...Linking text or HTML elements...</a>

  3. Kunal says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Am trying to get PDF to open in new tab and not download on clicking. I tried the target = “_Blank” attribute but it doesnt help – opens a new window but downloads anyway(without opening in browser
    Any thoughts?

  4. Regin says:
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    How can i download files directly to the disk instead of open in new tab or window?

    Any idea than please let me know.

  5. javed k ellis says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Thank you just the post I was looking for. Problem solved

  6. Mirza Md Shakil says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    when a visitor enters my blogger site, a file starts to download. bt i want it will do in q new window. so that they can see my contents. what should i do?

  7. omejames says:
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Hi!guys play bejeweled free online and enjoy full on entertainment here this one type of title matching puzzle video games really an amazing online game it is .Thanks for this one.

Leave a Reply

Your email address will not be published. Required fields are marked *