Alternative template for Details modal

Phoca Download - download manager
nigelj
Phoca Member
Phoca Member
Posts: 11
Joined: 18 Aug 2020, 09:12

Alternative template for Details modal

Post by nigelj »

Hi,

I would like to use a different layout for the Details modal popup.

Can someone tell me where the modal popup is called from (which file) and where the template for the modal lives. I've got a feeling that the template's component.php is used, but how do I change to use different layout file?

The reason I need to know is that I have customised component.php to include our company logo and some text as this file generates the print layout. That all works fine, but I didn't realise until today that Phocadownload Details modal now also has the same logo and text in it, but I don't want them here!!

Thanks, Nige
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Alternative template for Details modal

Post by Jan »

Hi, the detail is just standard Phoca Download website but it includes "tmpl=component" in URL suffix. This means, that this page is loaded without any modules, only the component output.

So the detail window is here:
components\com_phocadownload\views\file\tmpl\default.php

It is standard view, but Joomla! displays it without modules because it is called with suffix tmpl=component


Jan
If you find Phoca extensions useful, please support the project
nigelj
Phoca Member
Phoca Member
Posts: 11
Joined: 18 Aug 2020, 09:12

Re: Alternative template for Details modal

Post by nigelj »

Sorry, I'm not a developer and my knowledge of code/Joomla! coding is very limited!

When the details modal opens onscreen it now includes the changes I've in templates\[template]\component.php (my company logo and a message in the footer). Where is that file (component.php) specified to be used as the template for the modal popup?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Alternative template for Details modal

Post by Jan »

Hi, this is the Joomla! behaviour, when the URL gets the parameter tmpl=component, the component.php (stored in your template is loaded). So maybe I don't understand which file you want to find?

- the component.php
- the detail window
- or the file where the link is built?

Jan
If you find Phoca extensions useful, please support the project
nigelj
Phoca Member
Phoca Member
Posts: 11
Joined: 18 Aug 2020, 09:12

Re: Alternative template for Details modal

Post by nigelj »

OK, that makes sense.

I'd like to change where the link is built to use a different file, e.g. component_phoca_details.php. Then I can edit the additional items I've added to component.php.

Hope this makes sense now!?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Alternative template for Details modal

Post by Jan »

Hi,

Phoca Download does not decide in which file the content will be displayed, it can only use the suffix "tmpl=component"

- if the link does not use this suffix, whole site including modules like menu links, etc. are displayed
- if the link uses this suffix, only component output is displayed, without menu, etc.

But you cannot use any other suffix than this, this is Joomla! behaviour, so the link can only be displayed with modules (index.php) or without modules (component.php). And it is fully managed by Joomla! not by Phoca Download.

The output of the detail view is here:
components\com_phocadownload\views\file\tmpl\default.php
or Bootstrap version:
components\com_phocadownload\views\file\tmpl\default_bootstrap.php

So you can change the Phoca Download output here but you cannot change the Joomla! behaviour (to have another view than index.php or component.php)

Jan
If you find Phoca extensions useful, please support the project
nigelj
Phoca Member
Phoca Member
Posts: 11
Joined: 18 Aug 2020, 09:12

Re: Alternative template for Details modal

Post by nigelj »

Thanks Jan, I'll try to modify default.php tomorrow.

Nige
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Alternative template for Details modal

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply