News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

How to call a certain Template via download ID

Started by msabbagh627, 18.04.2024 02:34:09

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

msabbagh627

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?
Best Regards,
Mehdi Sabbagh
  •  

ColinM

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
Colin M
  •  

msabbagh627

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)
Best Regards,
Mehdi Sabbagh
  •  

ColinM

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
Colin M
  •  

msabbagh627

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?

Best Regards,
Mehdi Sabbagh
  •  

ColinM

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
Colin M
  •