Gossamer Forum
Home : Products : Links 2.0 : Customization :

Re: Different Categories Question (v2)

Quote Reply
Re: Different Categories Question (v2)
I have added the Different Categories Question (v2) by Bobsie and all seems to be fine (ref post: http://gossamer-threads.com/...uild_cat_tree;#27332 ). Could someone tell me how I change this mod so that only the category is displayed in this list and the subcats aswell. I don't understand why it is displaying the subcats. Reading the post it sounds like it should only display the categories and not the subcats.


Thanks inadvance

Hamsterpants

Last edited by:

Hamsterpants: Mar 4, 2003, 8:15 AM
Quote Reply
Re: [Hamsterpants] Different Categories Question (v2) In reply to
OK, Don't know why, but I made a small change and it works now...Maybee someone could tell me how this one small change would make a differance:

In NPH-Build

Code:




foreach $subcat (sort keys %category) {
if ($subcat !~ /^\s*$/) {
push (@rootcat, $subcat);



Added (see red)




foreach $subcat (sort keys %category) {
if ($subcat =~ m,^([^/]*)$,) {
push (@rootcat, $subcat);

Hamsterpants