Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#193 2007-01-26 17:13:37

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: [Archived] stw_category_tree

i want to mark the currently selected category by a style. just the currently selected one, neither it’s children nor it’s ancestors. something like putting a bullet before the currently displayed category. can i achieve this with stw_category? any help is greatly appreciated.

[edit]
to make it a little clearer i’ll show what i got now:
onclass=“aktiv” cat=”“

this works like i intend it for cats of the second level, but neither the first nor the third level.

Last edited by uli (2007-01-26 17:26:44)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#194 2007-01-26 17:24:54

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [Archived] stw_category_tree

Use the onclass="myClassName" attribute. I think you can avoid styling the ancestors and children using css selectors, ie something like:

li.myClassName {styling to display bullet}
.myClassName li {reset to normal styling}

not sure how to target the parent in css. Anyone?

Offline

#195 2007-01-26 17:45:23

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: [Archived] stw_category_tree

mrdale, combining your styling tips and my <code>cat=”“</code> gives a result, that’s a little better, as it marks the chosen first level categories. not too bad. but it dosn’t touch the children, i.e. they stay marked. hm.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#196 2007-01-26 17:47:56

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [Archived] stw_category_tree

show me where and I’ll take a look.

Offline

#197 2007-01-26 18:25:37

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: [Archived] stw_category_tree

it’s paedart.de. thanks, dale.
you think it’s a css problem?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#198 2007-01-26 18:36:37

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: [Archived] stw_category_tree

ah, sorry, i’ve forgotten to mention where trhe third level’s hidden. it’s here


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#199 2007-01-26 18:58:59

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [Archived] stw_category_tree

#sidebar-1 li.aktiv {
list-style:circle inside;
padding-left:0px;
}

#sidebar-1 li.aktiv ul li {
list-style:none; */reset the child LIs*/
padding-left:10px;
}

Offline

#200 2007-01-26 19:09:55

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: [Archived] stw_category_tree

i know i am not good at css, but am i doing something totally wrong? applying your rules the result stays the same (except for the circle), the ancestor stays marked even if the child is clicked. is this what you’ve intended?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#201 2007-01-26 19:21:11

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [Archived] stw_category_tree

Oops, that comment wasn’t kosher…

that second selector should have been…

#sidebar-1 li.aktiv ul li {
list-style:none; /*reset the child LIs*/
padding-left:10px;
}

essentially it’s saying is that…

  1. anything that is an li with a class aktiv, should be a list with a disc, then
  2. any child li of class aktiv should have those attributes reversed.

Last edited by mrdale (2007-01-26 19:25:38)

Offline

#202 2007-01-26 19:38:02

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: [Archived] stw_category_tree

allright …. pfff, hm, the difference between the first post and corrected one is the order of the comment’s escapes, right? I didn’t paste the comment. your styles give a disc only at the first level, no matter which level is clicked.
btw, did you find my “third level”-link in time and saw what happens to the first level li if you click the second or third level?

Last edited by uli (2007-01-26 19:38:52)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#203 2007-01-26 19:40:25

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [Archived] stw_category_tree

So to clarify, which level do you want to receive the special styling?

Last edited by mrdale (2007-01-26 19:45:59)

Offline

#204 2007-01-26 19:48:52

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: [Archived] stw_category_tree

the respective one. what I want to achieve is a category indicator. clicking on “Der Fall Andre” in the third level shall give an indicator for this category, not for any parent category, and not for any child category.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

Board footer

Powered by FluxBB