|
|
#1 |
|
Senior Member
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 468
Rep Power: 23 ![]() |
On my Calgary Real Estate section in the categories table under the last category (rentals) I want to remove number of listings. I need to do it because I just want to use the link to other section. But in this case the number of listings all the time will be zero.
The problem is, that I want to remove number of listings only under this category, and leave them under any other category. I am guessing that it could be done with {if} {else} statements, however I can not figure out how to do this. Is it possible? Any help appreciated.
__________________
Thanks, Sergey Bargain Finder in Calgary, Alberta, Canada. Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
Last edited by SkGold; 07-12-2007 at 12:38 AM. |
|
|
|
|
|
#2 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,780
Rep Power: 110 ![]() |
The best way that I can think of is by modifying the home template file and locate the {html_table_adv section. Then replace it with this:
Code:
{section name=tr loop=$data step=$cols}
<tr>
{section name=td start=$smarty.section.tr.index loop=$smarty.section.tr.index+$cols}
<td valign="top">
{if $data[td]<>""}
{$data[td].start_link}<img src="{$data[td].image}" border="0" alt="{$data[td].name}" /></a>
{$data[td].start_link}<strong>{$data[td].name}</strong></a> {if $data['td'].name!="Looking for Rental Property? Click here."} ({$data[td].total}) {/if}
{/if}
</td>
<td>
{/section}
</tr>
{/section}
__________________
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 | 68 @ Twitter | My Modules |
|
|
|
|
|
#3 | |
|
Senior Member
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 468
Rep Power: 23 ![]() |
Thanks Eric,
However when I did the change I got error: Quote:
PHP Code:
PHP Code:
__________________
Thanks, Sergey Bargain Finder in Calgary, Alberta, Canada. Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
|
|
|
|
|
|
|
#4 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,780
Rep Power: 110 ![]() |
I was kind of afraid of that when I posted it.
However can you get the category id and replace the if statement with this: Code:
{if $data['td'].id!=6} ({$data[td].total}) {/if}
__________________
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 | 68 @ Twitter | My Modules |
|
|
|
|
|
#5 | |||
|
Senior Member
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 468
Rep Power: 23 ![]() |
Thanks Eric, however still getting error:
Quote:
Quote:
Quote:
__________________
Thanks, Sergey Bargain Finder in Calgary, Alberta, Canada. Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
|
|||
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 468
Rep Power: 23 ![]() |
I tried it again still same error. Eric do you have any other thoughts?
__________________
Thanks, Sergey Bargain Finder in Calgary, Alberta, Canada. Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
|
|
|
|
|
|
#7 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,780
Rep Power: 110 ![]() |
Here some other things to try.
Code:
{if $data['td'].id != 246}
Code:
{if $data['td'].id != "246"}
Code:
{if $data['td'].id neq 246}
__________________
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 | 68 @ Twitter | My Modules |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 468
Rep Power: 23 ![]() |
I tried everything suggested plus some other variations with spaces and no spaces. No luck, still the same error.
__________________
Thanks, Sergey Bargain Finder in Calgary, Alberta, Canada. Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
|
|
|
|
|
|
#9 | |
|
Senior Member
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 468
Rep Power: 23 ![]() |
Eric fixed it. If somebody interested here is the right code for this. It is also don�t need apostrophes around [td].
Thanks a lot Eric. Quote:
__________________
Thanks, Sergey Bargain Finder in Calgary, Alberta, Canada. Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
|
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Removing the field that shows the number of times an advert has been viewed | sporthorsebreeder | v3.1 Questions & Support | 2 | 09-18-2006 07:07 PM |
| Top Listings | sbuell20 | v3.1 Questions & Support | 0 | 09-02-2006 12:11 PM |
| Removing # of Listings | CB | v3.1 Questions & Support | 1 | 05-14-2006 05:09 PM |
| Year | quickbiz | v3.0 Questions & Support | 2 | 04-21-2006 07:20 AM |
| Display Total Number of Listings | Eric Barnes | v3.0 Questions & Support | 2 | 03-30-2006 02:29 PM |