Hi Jan,
I'm using Phoca Download on a J3 and on a J4 site. Everything works as expected - but for one thing: I want the downloads to open in a new browser tab. I'm offering PDF files that live on an external file server.
AFAIK I habe to give the different items a file name that ends in .pdf to make the list display a pdf symbol in front.
Then I set the external link. In options I set 'External Download Link' to be _blank.
I would have thought that this procedure would open the resulting PDF in a new tab, but that's not the case, it will always open in the same tab.
As I said, the behaviour is the same in J3 as in J4. Do I miss something?
Cheers, Chris
Question about open download in a new tab
-
- Phoca Member
- Posts: 16
- Joined: 19 Aug 2017, 09:29
- Jan
- Phoca Hero
- Posts: 48536
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Question about open download in a new tab
Hi, if PDF is opened in your browser, depends of browser settings. Standard download function of PDF in Phoca Download works the way, that the server tries to force download instead of displaying. But in case, the link goes directl the the PDF on server, then no Phoca Download can decide how this file be handled. Such file is handled by browser and depends on browser settings. ![Idea :idea:](./images/smilies/icon_idea.gif)
Jan
![Idea :idea:](./images/smilies/icon_idea.gif)
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 16
- Joined: 19 Aug 2017, 09:29
Re: Question about open download in a new tab
Hi Jan,
perhaps I was not very clear. It's not how the PDF is presented, but I want it to open in a new browser tab, like you do when you say target="_blank". There is a setting claiming to do exactly that, but it does not work.
cheers, Chris
perhaps I was not very clear. It's not how the PDF is presented, but I want it to open in a new browser tab, like you do when you say target="_blank". There is a setting claiming to do exactly that, but it does not work.
cheers, Chris
- Jan
- Phoca Hero
- Posts: 48536
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Question about open download in a new tab
Hi, which setting do you exactly mean? Which part, can you paste a link to the site where this occurs?
It depends on many many different options:
- e.g. if the link does include the target blank or not
- if it is download link (target is just ignored) or standard link, etc.
Jan
It depends on many many different options:
- e.g. if the link does include the target blank or not
- if it is download link (target is just ignored) or standard link, etc.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 16
- Joined: 19 Aug 2017, 09:29
Re: Question about open download in a new tab
Hi Jan,
sure, what I mean is this setting
![Image](https://i.imgur.com/SMBiupq.png)
and then the site address is https://www.jug-zueri.ch/downloads.
Thanks, Chris
sure, what I mean is this setting
![Image](https://i.imgur.com/SMBiupq.png)
and then the site address is https://www.jug-zueri.ch/downloads.
Thanks, Chris
- Jan
- Phoca Hero
- Posts: 48536
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Question about open download in a new tab
Hi, yes it even depends on many factors. This parameter is here for links which link to some website, not directly to a file.
So, e.g. you will set this link there: https://www.phoca.cz/download/category/ ... -component (which is not direct link to a file) and you will set that this link will be opened in new tab. So if the link goes directly to file location - to download it, then such parameter is just ignored and everything is fully managed by browser/OS.
Jan
So, e.g. you will set this link there: https://www.phoca.cz/download/category/ ... -component (which is not direct link to a file) and you will set that this link will be opened in new tab. So if the link goes directly to file location - to download it, then such parameter is just ignored and everything is fully managed by browser/OS.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 16
- Joined: 19 Aug 2017, 09:29
Re: Question about open download in a new tab
Hi, yes, well thanks.
Only if I go and provide the link to the file manually, say in an article, it will open the file in a new tab whenever I include the target parameter. Sorry to say that this extension is not doing what I would expect.
Only if I go and provide the link to the file manually, say in an article, it will open the file in a new tab whenever I include the target parameter. Sorry to say that this extension is not doing what I would expect.
-
- Phoca Newbie
- Posts: 2
- Joined: 30 Mar 2022, 10:58
Re: Question about open download in a new tab
Hi Jan,
I have to agree with chrishoefliger. That worked before. Unfortunately, it hasn't worked since the last Joomla update. The PDFs no longer open in a new tab for me either.
Best regards
ralph
I have to agree with chrishoefliger. That worked before. Unfortunately, it hasn't worked since the last Joomla update. The PDFs no longer open in a new tab for me either.
Best regards
ralph
- Jan
- Phoca Hero
- Posts: 48536
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Question about open download in a new tab
This extension is download extension and it should provide download function for listed files. Or other features like previewing, etc. are extra addons. But can you please give me some exact example what exactly do you want to achieve. There are many many different combinations where Phoca Download is not able to do anything with the behaviour of browser/OS, etc. (direct link, not direct link, external link, internal link, etc.)chrishoefliger wrote: ↑30 Mar 2022, 09:40 Only if I go and provide the link to the file manually, say in an article, it will open the file in a new tab whenever I include the target parameter. Sorry to say that this extension is not doing what I would expect.
So can you give me example so I can test it and see if this is caused by Joomla or browser or OS?
The main key is here: "I'm offering PDF files that live on an external file server." If you have a link to external file server, then the external file server rules are valid, then the Phoca Download on your server, not Joomla, etc. Then rules are applied this way:
- first rule can be set by external file server - it can say it will force download or will display the file in browser
- second rule can be set by browser or OS - if server does not set the rule, browser or OS can apply own rules - to display or download the file.
In case Phoca Download will set 'target="_blank"' and such is ignored by browser/OS/server, there is nothing your server and Phoca Download can do.
Testing now and get no problem there on Joomla 4, see gif:
![Image](https://i.imgur.com/KmiIVw5.gif)
Set target blank for external link. Set PDF document as external link. All on Joomla 4 website. When clicking on the link, the PDF will be displayed in new tab (directly displayed as external server did not set any rule for this file, so it is managed by browser/OS rule)
But not sure if I understand the problem corectly?
Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 48536
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Question about open download in a new tab
I don't know what you exactly mean with "last Joomla update", but the logic say that if something worked before this update and it stopped workting thanks this updated that it seems Joomla core developers introduced some bug and maybe such should be reported on them.I have to agree with chrishoefliger. That worked before. Unfortunately, it hasn't worked since the last Joomla update. The PDFs no longer open in a new tab for me either.
![Idea :idea:](./images/smilies/icon_idea.gif)
But as you can see previous gif, I am testing it on latest Joomla 4.1.0 (4.1.1 was reverted) and get no such problem
![Idea :idea:](./images/smilies/icon_idea.gif)
![Image](https://i.imgur.com/saItwI1.png)
![Image](https://i.imgur.com/X0anNeQ.png)
![Image](https://i.imgur.com/a4shHPR.png)
Jan
If you find Phoca extensions useful, please support the project