View Full Version : Categories and Subcategories
Palyriot
10-27-2005, 06:05 AM
Does anyone have a way so that the Categories are listed in bold or something, and then the Subcategories would be listed below it, but not with commas and that crap. It'd kind of look like this:
Category
Sub Category
Sub Category
Sub Category
Category
Sub Category
Sub Category
Sub Category
David
10-27-2005, 06:27 AM
In the templates folder around line 34 of main.tpl, we have:
Content visible to registered users only.
Try changing to
Content visible to registered users only.
Palyriot
10-27-2005, 07:13 AM
Yah know, I figured that part out on my own, but I can't figure out no matter what I try, how to get the count of the subcategories. You can see what I mean at www.zero-life.com
vkaryl
10-27-2005, 09:55 PM
I've done this on all my stuff so far. If you download the 2 column tableless template linked in my sig, you'll see what I did to effect this change. Easier for you to grab it from there than for me to post a bunch of code here. You can see the result at http://reallyrelevantresults.com/ or http://findsouthernutah.com/.
Tim_Myth
10-27-2005, 10:14 PM
The category count is on line 32 of main.tpl:
Content visible to registered users only.
More specifically it is the bit:
<span class="count">({$cat.COUNT})</span>
If you have modified this line, it will probably not display a correct count of the number of sub categories.
ChrilleK
11-02-2005, 07:40 AM
Content visible to registered users only.
So, you mean that I should compare the 22 files in that zip with my own and try to figure out what to do to make it look like that?
Palyriot
11-02-2005, 02:50 PM
Hi tim, I have that right, but sub cat count only shows when I am in a certain category view. I wanted sub category counts to show on the index.
Tim_Myth
11-02-2005, 03:49 PM
Do you mean you want something like this?
Cat (4)
-Subcat (22)
-Subcat (3)
-Subcat (0)
-Subcat (91)
If so, I would not recommend it. Even if you only have 10 categories with an average of 4 subcats in each cat, that's 50 SQL calls (10 for each cat and 40 more for each subcat). Find the length of time it takes for your main page to load, then multiply it by 50. If it takes 1.2 seconds now (a fairly average load time by Alexa's standards), your page will take approximately 1 minute to load with a mod like this. Only dail-up users will wait that long, and I suspect you will see lots of people navigate away from you site before they've even seen it.
vkaryl
11-02-2005, 06:27 PM
Content visible to registered users only.
So, you mean that I should compare the 22 files in that zip with my own and try to figure out what to do to make it look like that?[/quote]
*rolls eyes* Of course not. You have only to look at the subcats section of main.tpl. But it seems that what you're wanting is something I no longer have in my setup anyway, as it was too slow (see my post in your other thread).
cheese729
11-30-2005, 09:09 PM
Content visible to registered users only.
So when will we know more
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.