Empty Category

Phoca Download - download manager
johnnys
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 29 Jun 2015, 10:10

Empty Category

Post by johnnys »

If a category is empty is it possible to display the text 'No downloads available' (or similar).

Version 3.0.6

I seen this post viewtopic.php?f=31&t=27575 however there was no answer.

Currently when a user clicks on an empty category they are taken to that category however there is no text to display if empty.

Thanks.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Empty Category

Post by Jan »

Hi, for now there is no such text (it was there but it was removed because most of users wanted to not display it here), so you need to set it directly in the output file:

components/com_phocadownload/views/category/tmpl/ ...

Jan
If you find Phoca extensions useful, please support the project
johnnys
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 29 Jun 2015, 10:10

Re: Empty Category

Post by johnnys »

Thanks Jan,

Which part of the code should I ammend? The reason I need it is because of site offers Job Vacancies, and when there are none i'd like to do one of two things;

- display 'no files available'
- auto unpublish the category

The first one seems easiest. Otherwise visitors get confused as to whether there are vacancies or not.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Empty Category

Post by Jan »

Hi, see: components\com_phocadownload\views\category\tmpl\default_files.php

You can add to the last line else condition:

FROM:

Code: Select all

}
TO:

Code: Select all

} else {
 echo "there is no file";
}
Jan
If you find Phoca extensions useful, please support the project
Post Reply