Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#76 2007-03-26 17:03:53
- redbullkirk
- New Member
- Registered: 2007-01-12
- Posts: 1
Re: [plugin] [ORPHAN] cbs_category_list
Great plugin! Any chance getting support for the “exclude” attribute like they have in the corresponding txp tag?
/kirk
Offline
Re: [plugin] [ORPHAN] cbs_category_list
I had to change part of line 61 of the plugin to get the ‘activeclass’ part to work (also, the convention for the default “category_list” tag is to use ‘active_class’):
Before:
($c == $name)
After:
($c == strtolower($name))
Last edited by thame (2007-07-29 14:29:38)
Offline
Re: [plugin] [ORPHAN] cbs_category_list
I was wondering if there’s any progress in terms of sorting – as mentioned here.
For me (and I’m sure for many other users of this wonderful plugin) it would be a big step forward, if there were at least the option to sort alphanumerically (as it is now) but with the possibility to reverse the order (e.g. I have categories for years and I want the latest year to be at the top).
Any chance of seeing this?
Offline
Re: [plugin] [ORPHAN] cbs_category_list
Thanks to Christophe for a very useful plugin. I am finding that the activeclass attribute is not being applied when in the default section (it is working for other sections). Is it possible to fix this? TXP 4.0.5.
Code is topiary
Offline
Re: [plugin] [ORPHAN] cbs_category_list
just letting you guys know, christophe hasn’t posted around these parts for nearly a year now.
Offline
Re: [plugin] [ORPHAN] cbs_category_list
I don’t know if this is a solution for you, but I find that it works with ?=messy links even in the default section.
jsoo wrote:
Thanks to Christophe for a very useful plugin. I am finding that the
activeclassattribute is not being applied when in the default section (it is working for other sections). Is it possible to fix this? TXP 4.0.5.
Offline
Re: [plugin] [ORPHAN] cbs_category_list
iblastoff wrote:
just letting you guys know, christophe hasn’t posted around these parts for nearly a year now.
Ta. Guess I’ll have another go at modifying it myself, then.
trailgirl wrote:
I don’t know if this is a solution for you, but I find that it works with ?=messy links even in the default section.
Good to know.
Last edited by jsoo (2008-01-24 01:12:59)
Code is topiary
Offline
Re: [plugin] [ORPHAN] cbs_category_list
Followup:
My problem was that this plugin’s activeclass attribute is not applied in the default section when using clean URLs.
This is because of how this plugin relates to TXP’s pagelinkurl function. The global $c variable gets unset, leaving the plugin nothing to match.
Ideally I would find a way to get truly clean URLs (e.g. no more /section/?pg=2&c=foo). But that’s more than I want to take on now.
So I hacked the plugin for my own situation, as follows. I have only tested this for the messy and /section/id/title URL schemes; it may or may not work with other “clean” URL schemes. If you are using messy URL’s there is no need to do this modification, because the plugin already works. Caveat emptor; my PHP skills are weak; YMMV, etc.
Below the line
global $s, $c;
add
$this_category = strtolower($c);
Near the end, find this expression:
$c == $name
and replace it with:
$this_category == strtolower($name)
Last edited by jsoo (2008-01-25 10:11:33)
Code is topiary
Offline
#84 2008-02-24 12:10:53
- SebastianS
- Member
- From: Australia
- Registered: 2007-10-05
- Posts: 46
Re: [plugin] [ORPHAN] cbs_category_list
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’,
Offline
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