jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => General => Topic started by: msabbagh627 on 18.04.2024 02:34:09

Title: How to call a certain Template via download ID
Post by: msabbagh627 on 18.04.2024 02:34:09
Hi Team,

I am trying to develop a module which shows the Chosen Summary Layout for a certain file.
I am not so professional in PHP, But since I read some documents, I think we have to do it with the below code which JDownloads namespace provides:

DisplayController::getInstance('Site', $config)

But I don't get any results. maybe I am using wrong states.
Can anyone help me on this?
Title: Re: How to call a certain Template via download ID
Post by: ColinM on 18.04.2024 17:16:47
Hi
I do not really understand your request!!! :(
There is only one Summary layout in jD.
Perhaps if you explain more I might understand better
ColinM
Title: Re: How to call a certain Template via download ID
Post by: msabbagh627 on 18.04.2024 17:17:56
As a complete description of what I am into:

Lets say I want to call the default.php layout located in components/com_jdownloads/tmpl/summary directory.

How can we call it and how do we have to pass the parameter methods to call a download page? (for example: download_id==2, and catid==3)
Title: Re: How to call a certain Template via download ID
Post by: ColinM on 18.04.2024 17:57:48
Hi
I think you are using the Content plugin in an article or similar.  And you want to specify which layout is used.  Is that correct?

Suggest you read article Content plugin
At the bottom of the article it explains how to call a Download layout which is in the
form {jd_file onlinelayout==layout name}.  Also in section entitled Layout Selection.
Please note you cannot call the Summary layout directly but you can "shorten" the path.

But first please confirm that it is the content plugin you are using

ColinM
PS think the article could be improved so I will add to my list
Title: Re: How to call a certain Template via download ID
Post by: msabbagh627 on 18.04.2024 18:33:48
Hi Colin,

Yes you got what I am looking for. But the Problem is that I want to show the summary layout of a file.
And as I looked into the plugin, it does not support the Summary Layouts for a file.
So what can I do?
IS there another way to do this?

Title: Re: How to call a certain Template via download ID
Post by: ColinM on 19.04.2024 14:10:22
Hi
I suspect that you want to use the summary layout as it goes straight to the final download button.
If you set some jD options then you can download directy
Please see article Front End Options
In particular look at section 10 Download Sequence.
If you set set direct Downloading to Yes and View Download Detail to No the the downloading starts immediatly.

Colin