Recent Topics

1 Jun 10, 2006 08:37    

Hi!

I want to use the subcategories for something else and therefor I need to hide them in the _categories.php file. How can I achive that they are not shown?

3 Jun 12, 2006 00:18

Looks like 'no' is correct else someone would have probably posted an answer. Here's a guess though, and your success or failure isn't something I'll predict. Open skins/_categories.php and find this line:

cat_children( $cache_categories, $blog, NULL, 'cat_list_before_first', 'cat_list_before_each', 'cat_list_after_each', 'cat_list_after_last', 0 );


Now comment it out with "// " at the beginning of the line.

That should get you in the right direction, though be aware some skins take the guts of skins/_categories.php and move it into skins/yourskin/_categories.php. You'll have to look at your skins/yourskin/_categories.php file to see if it calls skins/_categories.php or does all the work itself.

BTW I'm guessing that the cat_children function has something to do with sub-cats... Hope it helps!

5 Jun 15, 2006 04:27

you could hide the subcats with css:

ul ul { display: none; }

6 Jun 15, 2006 14:06

Wow. That easy =) Thanx!

Is it possible to dynamically hide them if you klick on the upper-level knot? =) Perhaps with JS something like that?

7 Jun 15, 2006 15:19

MarcDK wrote:

Is it possible to dynamically hide them if you klick on the upper-level knot? =) Perhaps with JS something like that?

I'm not sure what you mean by "upper levek knot." Can you explain your question a bit?

8 Jun 15, 2006 16:06

Sorry, I was in a rush.

I meant the main categories. Would it be possible that I can dynamically unhide the subcategories after I clicked on the main category?

10 Jun 15, 2006 18:23

Yes, but not with this ugly + and - symbols there. And what about "hovering" over a main-category that remains still clickable and then the sub-cats expand?

With your linked solution you are not able to click on the main cats.

11 Jun 15, 2006 19:15

If you don't like the icons, all you have to do is exchange them for your own images. I used that hack to make the categories on [url=http://softwareandtools.com/]this page[/url] and you can click on the main categories there. I'm sure the JS could be changed to make the the subcat appear on hover instead of onclick.

12 Jun 18, 2006 13:41

I have chosen a css-only hack:

/* Hide Subcategories*/



ul li:hover ul  { 
 display: block;
 margin: 0;
 padding: 0; 

}
ul ul { 
 display: none;
 margin: 0;
 padding: 0; 

}
ul ul a, ul ul a:visited {
 color: #bbb; 

}
ul ul a:hover{
 color: #365F9D; 

}
ul ul li{
 list-style-type: none;
 margin: 0;
 padding: 0;
 font-size: 90%;

}


Form is loading...