Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#97 2005-09-02 07:35:05

elmar
Member
From: Southern Germany
Registered: 2004-03-22
Posts: 24
Website

Re: [Archived] stw_category_tree

First, take a look at listamatic, they have many examples and a couple of tutorials on how to style a list. This plugin just ouputs a standard list, so you can style it however you need to.

To give the second level a different style than the fist, simply declare something like:

ul {background:green} /* First level, whole list */
li {color:black} /* First level, indivual element */

li ul {background:red} /* Second level list */
li li {color:white} /* Second level, indivual element */

This is a bad example, but maybe you get the idea. I have done this on my website with a simple navigation and this plugin. Let me know if that helps.

Last edited by elmar (2005-09-02 07:35:43)

Offline

#98 2005-09-02 13:09:02

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [Archived] stw_category_tree

flowmom – You don’t need to change the cssid in the plugin code. Just at the cssid attribute to the stw_category_tree tag like so: <code><txp:stw_category_tree cssid=“whatever” /></code>

Offline

#99 2005-09-02 15:27:16

flowmom
Member
Registered: 2005-08-23
Posts: 15
Website

Re: [Archived] stw_category_tree

>elmar wrote:
>First, take a look at listamatic, they have many examples and a couple of tutorials on how to style a list. This plugin just ouputs a standard list, so you can style it however you need to.

Thanks, your suggestions worked great elmar…beautiful site, by the way.

>tinyfly wrote:
>You don’t need to change the cssid in the plugin code. Just at the cssid attribute to the stw_category_tree tag like so: <code><txp:stw_category_tree cssid=“whatever” /></code>

Thanks. I have tried <code><txp:stw_category_tree cssid=“catlist” /></code> after removing catlist from the plugin but I wasn’t able to style the list using <code>catlist</code> in the stylesheet. Care to share example code of how I would do that? I’m not positive I am using the correct syntax for how to include <code>catlist</code> in the stylesheet.


new to TXP, CMS, CSS, PHP

Offline

#100 2005-09-02 15:36:50

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [Archived] stw_category_tree

It should output your cssid as id=“catlist” in the actual html so in your css you would style it like so:

<pre>
#catlist{ style1: here; style2: here;
}
</pre>

Last edited by tinyfly (2005-09-02 15:37:25)

Offline

#101 2005-09-02 16:09:42

flowmom
Member
Registered: 2005-08-23
Posts: 15
Website

Re: [Archived] stw_category_tree

I have figured it out now! Elmar and tinyfly, your advice was very helpful.

Last edited by flowmom (2005-09-02 16:42:38)


new to TXP, CMS, CSS, PHP

Offline

#102 2005-09-02 16:40:51

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [Archived] stw_category_tree

In your css file:

<pre>
#sidebar-2 p, #sidebar-1 p

{

line-height: 15px; font-size: 10px;

}

}
</pre>

Remove that extra closing }

Also, #catlist is applied to the ul tag. You also have styles on an li tag that will override #catlist, hence the cascading in cascading style sheets. You can do this:

<pre>
#catlist li{ style1: whatever; style2: whatever;
}
</pre>

This will override any your other li styles. Also, you can set onclass=”“ to get rid of all the ids on the li tags. Which I would highly suggest.

Last edited by tinyfly (2005-09-02 16:41:47)

Offline

#103 2005-09-02 16:44:21

flowmom
Member
Registered: 2005-08-23
Posts: 15
Website

Re: [Archived] stw_category_tree

Thanks so much tinyfly – more helpful advice…I really appreciate the hand-holding. It’s working now thanks to both of you.

Last edited by flowmom (2005-09-02 16:45:05)


new to TXP, CMS, CSS, PHP

Offline

#104 2005-09-02 17:12:48

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [Archived] stw_category_tree

Glad I could help.

Here is a great site for tutorials on html and css HTML Dog

Offline

#105 2005-09-04 15:50:06

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: [Archived] stw_category_tree

This is a great plugin! Nontheless, there is a bug: when counting articles in categories, future articles are counted, even if they’re not yet displayed!

There is a quick way to fix it in the counting function?

z-

Offline

#106 2005-09-09 11:52:40

alexandra
Member
From: Cologne, Germany
Registered: 2004-04-02
Posts: 1,370

Re: [Archived] stw_category_tree

Trying to install the plugin on 4.0.1 i get the following Notice:

Notice: unserialize() [function.unserialize]: Argument is not an string in /www/htdocs/***/textpattern/include/txp_plugin.php on line 152

…empty Plugincode

any ideas?

Offline

#107 2005-09-09 21:31:46

Garfield
Member
From: Barcelona
Registered: 2005-07-09
Posts: 11
Website

Re: [Archived] stw_category_tree

Santheo, thanks for this plug-in I was waiting for its upgrade during months … and it paid off, it’s really an unvaluable plug-in!!

I’ve installed and it works very well, I just have one question. The parameter “cssid” assings a “ID=‘xxx’” to the top-level ul tag. <b>Why did you choose an ID and not a CLASS?</b>

Most tags from TXP uses CLASSes and so you can insert multiple instances in a page, I’m a CSS newbiee but I think that a CLASS tag will allow to insert two trees defining just one style… In short, I think that if your plugin replaces th ID tag with a CLASS tag it will match more with the rest of TXP.

thanks for your time.

cssid The value you’d like assigned to the id property of the top-level ul tag

Offline

Board footer

Powered by FluxBB