How to link each of the most downloaded files to the actual file, instead of the category?
Thank you!
Most downloaded files
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Most downloaded files
Hi, which "most downloed files" part you exactly mean?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 5
- Joined: 25 Dec 2021, 16:07
Re: Most downloaded files
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!
The most downloaded files actually point to the category.
Thank you!
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Most downloaded files
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
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
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 5
- Joined: 25 Dec 2021, 16:07
Re: Most downloaded files
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!
I only have very limited knowledge of PHP scripts. Please can you help to give me an example?
I appreciate your help greatly!
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Most downloaded files
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
FROM:
PhocaDownloadRoute::getCategoryRoute($value->categoryid,$value->categoryalias)
TO:
PhocaDownloadRoute::getFileRoute($value->id, $value->categoryid,$value->alias, $value->categoryalias)
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 5
- Joined: 25 Dec 2021, 16:07
Re: Most downloaded files
Thank you very much, it works!
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Most downloaded files
Ok, great to hear it.
Jan
Jan
If you find Phoca extensions useful, please support the project