Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2008-02-24 12:21:38

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [plugin] [ORPHAN] cbs_category_list

SebastianS wrote:

I was wondering how to get to style cbs_category_list so that I don’t get the categories running into each other

CSS ResourcesCSS Tools”

webdevelopmentnotes.com/Web_Development/

.cbs_category_list {display: inline}
<txp:cbs_category_list wraptag=“p”/>

I edited the Plugin to take out default break:- ‘break’ => ‘’, originally it was break’ => ‘br’,

couldn’t you have just done <txp:cbs_category_list wraptag="p" break="" />

Offline

#86 2008-02-24 13:27:40

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [plugin] [ORPHAN] cbs_category_list

You could use a break of "span", then style the span with the margins you want. Or you could use a string for the break, such as " " (a space), or " | ".


Code is topiary

Offline

#87 2008-02-24 22:36:03

SebastianS
Member
From: Australia
Registered: 2007-10-05
Posts: 46

Re: [plugin] [ORPHAN] cbs_category_list

Thank you for your replies.

Steve you said:- ‘couldn’t you have just done <txp:cbs_category_list wraptag=“p” break=”“ />’,

This would have worked if on J Soo’s suggestion I had used a string for the break, such as “ “ (a space), or “ | “.’ I didn’t realise that could be done.

J Soo when you say “You could use a break of “span”, then style the span with the margins you want,

where does one put the ‘span class’ or whatever markup to be used?

For example <span class=“classname”><txp:cbs_category_list wraptag=“p” break=” | “ /></span>

or does it go <txp:cbs_category_list span class=“classname” wraptag=“p” break=” | “ />

I’ve tried both and they didn’t work.

Offline

#88 2008-02-25 00:12:28

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [plugin] [ORPHAN] cbs_category_list

I meant <txp:cbs_category_list break="span" />. This will wrap each category in <span></span> tags. To select those span elements in your CSS, put a div with an id or class around the list. You could do this in two ways, like this:

<txp:cbs_category_list break="span" wraptag="div" class="foo" />

or this:

<div class="foo">
<txp:cbs_category_list break="span" />
</div>

then use the CSS selector:

div.foo span {}

Last edited by jsoo (2008-02-25 00:14:44)


Code is topiary

Offline

#89 2008-02-25 08:22:59

SebastianS
Member
From: Australia
Registered: 2007-10-05
Posts: 46

Re: [plugin] [ORPHAN] cbs_category_list

J Soo thank you for that, I learnt more about what break=”“ and wraptag=”“ can do.

Offline

#90 2008-05-02 15:42:01

milkshake
Member
From: Linz, Austria
Registered: 2007-06-24
Posts: 80
Website

Re: [plugin] [ORPHAN] cbs_category_list

the default <txp:category_list /> tag covers the functionality of this plugin now i think, though requires a bit more tinkering

Offline

#91 2008-10-26 18:32:23

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: [plugin] [ORPHAN] cbs_category_list

I’m having a bit of trouble with the active class.
My tag is: <txp:cbs_category_list section=“Products” parent=“products” wraptag=“ul” break=“li” activeclass=“active”/>

but when I go to a particular category I don’t get any active class any clues as to what can happen?


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#92 2008-10-26 20:06:26

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] cbs_category_list

I have this on the TXP Tips site and it works fine:

<txp:cbs_category_list section="articles" wraptag="ul" break="li" showcount="true" class="category_list" activeclass="active" />

Have you checked the HTML output?

Offline

#93 2008-10-26 20:19:56

trailgirl
Member
Registered: 2004-06-04
Posts: 68
Website

Re: [plugin] [ORPHAN] cbs_category_list

Kemie, how is “active” is defined in your stylesheet?

Offline

#94 2008-10-26 20:39:07

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: [plugin] [ORPHAN] cbs_category_list

jstubbs, the html output is simply:

<ul class="cbs_category_list">
	<li><a href="http://xxx.com/en/Products/?c=Bracelets">Bracelets</a></li>
	<li><a href="http://xxx.com/en/Products/?c=Earrings">Earrings</a></li>
</ul>

This taken from the url http://xxx.com/en/Products/?c=Bracelets
trilgirl, the css is a simple .active{font-weight:bold}

could it be the /en/ throwing it off? I’m using MLP for a multi-language site


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#95 2008-10-26 21:22:58

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] cbs_category_list

It must be MLP, assuming you have an active class. Best bet is to post on the MLP thread.

Offline

#96 2008-10-27 09:32:34

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: [plugin] [ORPHAN] cbs_category_list

thanks! i do have an active class, and in any case, it should show up in the html regardless of the css. so i guess it’s mlp, i’ll ask around there :)


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

Board footer

Powered by FluxBB