Page 1 of 1

Alternative template for Details modal

Posted: 09 Apr 2021, 13:57
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

Re: Alternative template for Details modal

Posted: 11 Apr 2021, 16:35
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

Re: Alternative template for Details modal

Posted: 11 Apr 2021, 16:51
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?

Re: Alternative template for Details modal

Posted: 11 Apr 2021, 17:50
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

Re: Alternative template for Details modal

Posted: 11 Apr 2021, 17:57
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!?

Re: Alternative template for Details modal

Posted: 11 Apr 2021, 19:07
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

Re: Alternative template for Details modal

Posted: 11 Apr 2021, 21:20
by nigelj
Thanks Jan, I'll try to modify default.php tomorrow.

Nige

Re: Alternative template for Details modal

Posted: 16 Apr 2021, 16:53
by Jan
Ok