Page 1 of 1
Empty Category
Posted: 29 Jun 2015, 10:12
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.
Re: Empty Category
Posted: 29 Jun 2015, 12:38
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
Re: Empty Category
Posted: 29 Jun 2015, 12:42
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.
Re: Empty Category
Posted: 04 Jul 2015, 19:52
by Jan
Hi, see: components\com_phocadownload\views\category\tmpl\default_files.php
You can add to the last line else condition:
FROM:
TO:
Code: Select all
} else {
echo "there is no file";
}
Jan