Page 1 of 1
Most downloaded files
Posted: 26 Dec 2021, 03:15
by pubdown
How to link each of the most downloaded files to the actual file, instead of the category?
Thank you!
Re: Most downloaded files
Posted: 27 Dec 2021, 17:19
by Jan
Hi, which "most downloed files" part you exactly mean?
Jan
Re: Most downloaded files
Posted: 27 Dec 2021, 17:25
by pubdown
Sorry, I meant the most downloaded files on the download homepage, like this demo
https://www.phoca.cz/joomla3demo/phoca-download-demo.
The most downloaded files actually point to the category.
Thank you!
Re: Most downloaded files
Posted: 03 Jan 2022, 01:30
by Jan
Hi, to change it, the output of categories view needs to be edited:
components/com_phocadownload/views/categories/tmpl/default.php ( PhocaDownloadRoute::getCategoryRoute should be changed to PhocaDownloadRoute::getFileRoute)
(File view is not default option, so the link goes to category view)
Jan
Re: Most downloaded files
Posted: 03 Jan 2022, 04:26
by pubdown
Thank you very much for the reply.
I only have very limited knowledge of PHP scripts. Please can you help to give me an example?
I appreciate your help greatly!
Re: Most downloaded files
Posted: 03 Jan 2022, 13:56
by Jan
Hi, in fact, I have added it in previous post, there is only one change:
FROM:
PhocaDownloadRoute::getCategoryRoute($value->categoryid,$value->categoryalias)
TO:
PhocaDownloadRoute::getFileRoute($value->id, $value->categoryid,$value->alias, $value->categoryalias)
Jan
Re: Most downloaded files
Posted: 03 Jan 2022, 19:11
by pubdown
Thank you very much, it works!
Re: Most downloaded files
Posted: 04 Jan 2022, 14:09
by Jan
Ok, great to hear it.
Jan