Go Back   Pligg CMS Forum > Pligg Development > Pligg Templates > Template Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-15-2007, 03:13 AM
Constant Pligger
 
Join Date: Feb 2007
Posts: 236
Thanks: 20
Thanked 29 Times in 15 Posts
bold the main category, but unbold the subcategory?

hi, my pligg website uses the following category order:

Main Category
- subcategory
- subcategory

I played around with the categories template but had no clue how to make it so that the main category is bolded, while the subcategories are not. for example:

Main Category
- subcategory
- subcategory

is there any way to do this? I'd assume I can put a style tag for the main category, but I tried that and it seems that all of them apply the style, as opposed to only the main category.

thanks
Reply With Quote
  #2 (permalink)  
Old 02-17-2007, 04:49 AM
Constant Pligger
Pligg Version: 9.8
Pligg Template: garx mod
 
Join Date: Oct 2006
Location: Poland
Posts: 134
Thanks: 11
Thanked 6 Times in 5 Posts
nice to see, im not alone. also waiting for howto suggestions.

Last edited by daone; 02-17-2007 at 07:54 AM..
Reply With Quote
  #3 (permalink)  
Old 02-17-2007, 02:50 PM
Constant Pligger
 
Join Date: Feb 2007
Posts: 236
Thanks: 20
Thanked 29 Times in 15 Posts
well, I did look around myself, and this isn't really possible because the categories are looped by codes (if you get what i mean) so, in fact, by putting <ul> codes around the categories makes them indent and each category will be surrounded by its own <ul> code.

so if I put <b> around the category, all of them will be bolded.

so this isn't an easy task (through my eyes) and requires a few extra coding to make it work.
Reply With Quote
  #4 (permalink)  
Old 02-23-2007, 05:31 AM
Constant Pligger
Pligg Version: 9.8
Pligg Template: garx mod
 
Join Date: Oct 2006
Location: Poland
Posts: 134
Thanks: 11
Thanked 6 Times in 5 Posts
abcdefgary: any progress? ;p

seems to no one is interesting in, strange, because if you have many categories in list(with subcategories) looks ugly ;/
Reply With Quote
  #5 (permalink)  
Old 02-23-2007, 06:16 PM
Constant Pligger
 
Join Date: Feb 2007
Posts: 236
Thanks: 20
Thanked 29 Times in 15 Posts
mm, no. i have no idea how to do this. it seems to me that there is quite a lot of modifying of codes involved. and im only a beginner.
Reply With Quote
  #6 (permalink)  
Old 02-28-2007, 09:57 PM
New Pligger
 
Join Date: Feb 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Can't you just look at the parent category and apply different CSS for different levels?
Reply With Quote
  #7 (permalink)  
Old 02-28-2007, 10:33 PM
Constant Pligger
 
Join Date: Feb 2007
Posts: 236
Thanks: 20
Thanked 29 Times in 15 Posts
I believe it doesn't work like that... well, I tried, and it doesn't work. the categories all loop a before and after code.
Reply With Quote
  #8 (permalink)  
Old 03-13-2007, 12:27 PM
Constant Pligger
Pligg Version: 9.8
Pligg Template: garx mod
 
Join Date: Oct 2006
Location: Poland
Posts: 134
Thanks: 11
Thanked 6 Times in 5 Posts
nobody could support us? devs, any hints how to bold main category? ) ".)
Reply With Quote
  #9 (permalink)  
Old 03-30-2007, 03:24 AM
Constant Pligger
Pligg Version: 9.8
Pligg Template: garx mod
 
Join Date: Oct 2006
Location: Poland
Posts: 134
Thanks: 11
Thanked 6 Times in 5 Posts
..up..
im trying,and trying with no result,

<code noob

maybe someone support us..
Reply With Quote
  #10 (permalink)  
Old 03-30-2007, 05:36 AM
beatniak's Avatar
Pligg Donor
 
Join Date: Apr 2006
Location: NL - 52.100863;5.108356
Posts: 310
Thanks: 14
Thanked 77 Times in 48 Posts
Quote:
Originally Posted by abcdefgary View Post
well, I did look around myself, and this isn't really possible because the categories are looped by codes (if you get what i mean) so, in fact, by putting <ul> codes around the categories makes them indent and each category will be surrounded by its own <ul> code.

so if I put <b> around the category, all of them will be bolded.
Auch!!! Never use the <b> tag, but make things bold with your CSS.

To fix this problem, make sure the HTML in the tpl's look something like this:
Code:
<div id="steef_solution">
<ul>
  <li>Main Cat</li>
    <ul>
      <li>Secondary Cat</li>
      <li>Secondary Cat</li>
    </ul>
</ul>
</div>
After that, just put something like this in your CSS:
Code:
  #steef_solution ul li {font-weight:bold;color:red;}
  #steef_solution li li {font-weight:normal;color:blue;}
Result is (tested and works):
Quote:
- Main Cat
  • Secondary Cat
  • Secondary Cat
To get rid of the bullets, just add "list-style:none;" (without the quotes) to the corresponding line in your CSS. Making you own buttons is nicer anyways. To create a nicer button, use something like:
Code:
#steef_solution ul li a {
  display:block;line-height:2; 
  font:bold 12px arial;text-decoration:none; //nice font, no underline
  padding:5px 0 5px 25px;  //create some space for the bullet
  background:#fff url("../images/my_nice_looking_button.gif") no-repeat 0px 8px
}
#steef_solution ul li a:hover {
  color:#c00; //some other font color when hovering
  background:#ccc url("../images/my_nice_looking_button.gif") no-repeat 0px 8px //some other bg color when hovering
}
__________________
Like my work? Donations are welcome if you would like to support my work!
Finger pliggin' good sites of mine: receptencocktail.nl / numarketing.nl / goboz.com

Last edited by beatniak; 03-30-2007 at 05:53 AM..
Reply With Quote
The Following User Says Thank You to beatniak For This Useful Post:
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Control of meta description - categories Divisive Cotton Suggestions 63 10-16-2008 01:02 AM
[SOLVED] RSS Feed of a Main Category does not include subcategories ortho Bug Report 3 10-01-2008 10:22 PM
Top level category RSS feed does not contain subcategory items Jsimonweb General Help 2 09-28-2008 06:10 PM
Space Between Main Category and Sub Category hkardon General Help 0 06-26-2008 02:46 AM
Can you post category contents on the main page? qwik3r General Help 0 11-06-2007 12:50 AM


Search Engine Friendly URLs by vBSEO 3.2.0