Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] cbs_category_list
Is there a way to make this plugin display only category2 links?
Mark
Offline
#74 2007-01-16 14:59:34
- dimfish
- Member
- Registered: 2006-06-01
- Posts: 72
Re: [plugin] [ORPHAN] cbs_category_list
Hi.
I am using this plugin (which is great) in my navigation sidebar to show a list of categories but is there a way I can use it to generate a list of the articles in a category and position it as a sub-list within the category list (ie like a 3rd level of navigation)?
You can see how I am using it here, but I’d like to have that article list that appears in the main content area tucked under the ‘Why are we here’ in the sidebar.
Many many thanks for any help on this!
Offline
Re: [plugin] [ORPHAN] cbs_category_list
nardo wrote:
which url form?
“/section/category” as opposed to “/section/?c=category”
I am having the same issue as nardo was having, in that I use Clean URLs in TextPattern on an IIS server with ISAPI_Rewrite. I was trying to modify the plugin code to remove the “?c=” code so that the url would read “/section/category” however I was unsuccessful. I am a super novice to PHP, and I’m not sure that what I’m doing is even possible after reading this whole thread. There has got to be a way though, even if it was to heavily modify the href output of the plugin to just append it’s variable for category (unless that whole variable literally contains the “$c=”).
I hope I’ve explained myself well enough, and also hope that someone has an answer. I have got the plugin to just output the link “www.mysite.com/section/” so if i could just modify this plugin to append the section name alone, I think it would work.
Anyways, I hope my request isn’t too much to ask, nor do I mean any disrespect to Christophe Beyls, as I just have a ‘different’ setup of TXP with Clean URLs and IIS.
Thanks in advance,
George
Offline
#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
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.
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