This is a discussion on Hide Categories without Ads within the v4 Modules / Modifications forums, part of the Help & Support category; Hello, Is there any way to hide categories that have no ads on the category page? When a listing is ...
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
Is there any way to hide categories that have no ads on the category page? When a listing is added the category would then show. This would be a great feature. thanks for any help Mark Developer 4.08 |
|
#2
|
||||
|
||||
|
You should be able to do that at the template level.
Open home.tpl and find: {if $data[td]<>""} Replace with: {if $data[td]<>"" && $data[td].total > 0}
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#3
|
|||
|
|||
|
Thanks Eric,
That sort of worked.. but it leaves gaps in the table where the categories with ads should have been, ill have a play with the code to see if i can get it working. Thanks Mark Developer 4.08 |
|
#4
|
||||
|
||||
|
Thats because the table data tag is above the evaluation. You really want to evaluate if there are ads before you create the table data tag.
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#5
|
|||
|
|||
|
Thanks Larry,
Yeah, i see that from the code, trying to find a work around, if i crack it ill post the code here.. Mark |
|
#6
|
|||
|
|||
|
Have you had any luck with this?
|
|
#7
|
|||
|
|||
|
v4 is really better than v3, a lot of things are possible now, I do have to change a lot of php files, however I first try to change tpl files before editing php files,
here is the solution you are asking PHP Code:
Last edited by darek; 10-18-2008 at 03:22 AM. Reason: edited |
|
#8
|
|||
|
|||
|
Thanks Darek, i didn't get around to having a go at it myself..
Mark |
|
#9
|
||||
|
||||
|
So where is dareks code used? category.php?
__________________
v4.09 Developer MKClassifieds "All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642) |
|
#10
|
||||
|
||||
|
Quote:
__________________
Chaslie V3.1.10 dev mods.auscity.com AUSCITY 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals HTML Help W3 Schools |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hide categories if no product | paulsra | v3.1 Questions & Support | 1 | 10-22-2007 10:00 AM |
| Hide Categories based on User Login ID | Unregistered | Pre Sales Questions | 1 | 06-15-2007 02:57 PM |
| How to Hide Categories | tipud | v3.1 Questions & Support | 2 | 05-19-2007 11:41 AM |
| Hide top categories on add listing | calaf6 | v3.1 Modules & Modifications | 3 | 06-25-2006 03:22 AM |
| Prevent Browse Categories Table for hidden categories | free2take | v3.0 Questions & Support | 3 | 05-12-2006 11:14 AM |