|
|
#1 |
|
Member
Join Date: Jul 2008
Posts: 77
Rep Power: 6 ![]() |
I have read a ton of threads on how to display the total number of listings beside the category on a left menu bar and can't make any of the methods work. I have a left side menu with parent categories. All I would like to do is have the running total of each category next to the name.
I came close to having this, though the numbers were on the top left of each text line and got a few errors to boot. Is there an easy way to get this to show? Chris |
|
|
|
|
|
#2 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,191
Rep Power: 120 ![]() |
Hi,
You should be able to use this: Code:
{categories_parent}
<ul>
{foreach from=$pcat item=entry}
<li>{$entry.link}</li>
{/foreach}
</ul>
__________________
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 |
|
Member
Join Date: Jul 2008
Posts: 77
Rep Power: 6 ![]() |
I put in your code and nothing happened. No totals anywhere. When you said that only the parent categories would show totals, if there were a couple of subs in on parent category, then that parent category would show (0)? Is there a way to show totals of the parent and any and all subs?
Here is the code that I have in the layout.tpl file thus far. I tried the code you suggested and then replaced the original back again when it didn't work. <div id="sidebar"> <h1>{$smarty.const.LANG_TPL_NAVIGATION}</h1> <ul class="sidemenu"> {categories_parent} {foreach from=$pcat item=entry} <li>{$entry.link}</li> {/foreach} </ul> </div> |
|
|
|
|
|
#4 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,191
Rep Power: 120 ![]() |
Replace the file includes/classes/smarty/plugins/function.categories_parent.php with the code below:
PHP Code:
Code:
{categories_parent}
<ul>
{foreach from=$pcat item=entry}
<li>{$entry.link} {$entry.total}</li>
{/foreach}
</ul>
__________________
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 |
|
Member
Join Date: Jul 2008
Posts: 77
Rep Power: 6 ![]() |
I got the numbers though it looks a bit off. Plus, the numbers aren't accurate. Any suggestions?
You can see what I'm looking at here: http://www.closeoutfloorsamples.com/?template=TEST chris |
|
|
|
|
|
#6 | |
|
Coder
Join Date: Mar 2006
Posts: 4,631
Rep Power: 112 ![]() ![]() ![]() |
Quote:
With that in mind, all of your time and energy invested now may be wasted when your site gets busy and you want to disable the counting. Category counts used to be in the template by default but too many people complained it slowed down their sites too much. |
|
|
|
|
|
|
#7 |
|
Member
Join Date: Jul 2008
Posts: 77
Rep Power: 6 ![]() |
Isn't that the case. You have something and people complain, then you take it away and they continue to complain about the lack of the product that they didn't like to begin with. It makes sense and I really hope to have this site buzzing with all kinds of ads. With this info, I'm going to let this one go. No numbers is fine, though I think for now I'm going to leave the totals on the subs. Thanks again for your help. Talk with you later.
Chris |
|
|
|
|
|
#8 | |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,191
Rep Power: 120 ![]() |
Quote:
__________________
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 |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Display all ads and their category | hel68c | Modules / Plugins / Modifications | 5 | 08-21-2008 04:36 PM |
| Disable category listing total | LittleRascal | v3.1 Questions & Support | 4 | 08-01-2008 02:45 PM |
| How to display category total listings? | dankellaway | v3.1 Questions & Support | 2 | 03-13-2007 01:25 PM |
| EhopRealty.com | DVM | Site Critiques | 10 | 02-12-2007 12:49 PM |
| Category Menus | versatility | v3.1 Questions & Support | 5 | 08-08-2006 12:17 PM |