|
|
#1 |
|
Member
Join Date: Jan 2009
Location: England
Posts: 42
Rep Power: 2 ![]() |
Hi all,
What im looking to acheive is at the top of the showlistings.tpl page, to show the number of items within that chosen category. So it would read something like: There are 56 caravans for sale Any pearls of wisdom welcome Many Many thanks in advance Jason
__________________
v4.0.9 Hosted |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Mar 2006
Posts: 4,151
Rep Power: 102 ![]() ![]() |
You should be able to use the smarty vaariable {$numrows} in the showlistings.tpl
__________________
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 | Event Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2009
Location: England
Posts: 42
Rep Power: 2 ![]() |
Many Thanks Larrry
__________________
v4.0.9 Hosted |
|
|
|
|
|
#4 | |
|
Genius At Work
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 709
Rep Power: 18 ![]() |
Thats what i use but does anyone know how to make it show something like this
Quote:
Nick
__________________
Nick Bowers 68c v4.09 Developer |
|
|
|
|
|
|
#5 | |
|
Moderator
Join Date: Mar 2006
Posts: 4,151
Rep Power: 102 ![]() ![]() |
Quote:
If you have your site to display 10 ads per page then you should be able to do some basic math to display what you want. if you on the second page.... pagenum times 10 should give you the starting ad number {$pageNum * 10} would give you the number 20. You probably need to add some logic to detrmine if you on the first page though otherwise ti will say showing 10-10. add 10 to the above math to get page displayed max ad number {$pageNum *10+10} BUT what if you are on page 4 and have only 45 ad? It would say 40-50 of 45 so you need to do some more math to check the values. Showing {if $pageNum =="1"} {$pageNum} {else} {$pageNum * 10} {/if} - {if $pageNum *10+10 > $numrows} {$numrows} {else} {$pageNum *10+10 } {/if} of {$numrows} listings. The above isnt testd but should give you a start.
__________________
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 | Event Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
|
|
|
|
|
#6 |
|
Genius At Work
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 709
Rep Power: 18 ![]() |
This seems to work well.
Code:
Showing
{if $pageNum =="1"}
{$pageNum} - 15
{else}
{$pageNum*15-15} -
{/if}
{if $pageNum =="1"}
{else}
{if $pageNum*15 > $numrows}
{$numrows}
{else}
{$pageNum*15+15-15 }
{/if}
{/if}
of
{$numrows}
listings.
__________________
Nick Bowers 68c v4.09 Developer |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to show the number of listings in subcategories? | AHTOXA | v4 Modules / Modifications | 8 | 11-16-2008 03:28 PM |
| How to display a count of the number of ads in a category | j890432m | v4 Questions & Support | 12 | 07-15-2008 03:19 PM |
| Removing number of listings in home.tpl.php | SkGold | v3.1 Modules & Modifications | 8 | 12-20-2006 10:04 PM |
| Show customers URL on showlistings.tpl.php | marketingsolutions | v3.1 Questions & Support | 0 | 11-01-2006 08:38 PM |
| Display Total Number of Listings | Eric Barnes | v3.0 Questions & Support | 2 | 03-30-2006 02:29 PM |