Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
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
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
Re: [plugin] [ORPHAN] cbs_category_list
Kemie, how is “active” is defined in your stylesheet?
Offline
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
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
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