Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#256 2007-11-29 01:26:13
- vickilh
- Member
- Registered: 2007-10-30
- Posts: 96
Re: [Archived] stw_category_tree
Hello!
My most simple question is: Is there some way to have the ‘Article Category Name’ be in the same format as the ‘Article Category Title’?
I recently upgraded from an earlier version of TXP, where the category name and title were formatted the same. All of my “old” migrated categories names are fine, they remained as they were. But with any newly created categories, the category names now get formatted like this (entered the same as ‘category title’):
article category name: 01-My-Category article
category title: 01. My Category
I.e., hyphens are substituted for spaces, etc..
I am using the stw_category_tree plugin, version 0.4. Everything is working fine with this old version plugin with my 4.0.5 TXP. I did try upgrading the plugin (just thought it might be a good idea), but everything went wild so I just quickly went back to the old version. Everything seemed to be working fine until I added new categories.
So, with using the plugin, I can’t use the “title=1” option.
I’ve tried modifying the plugin, but without success so far. Any help / ideas greatly appreciately!!
—————————————
Hello!
I can’t remember what happened when I upgraded the plugin (just know it didn’t work), and now this machine is in Production. —What I’ve done is modify the plugin to do a replace on hyphens. Thanks! Vicki
Thanks! Vicki
Last edited by vickilh (2007-12-03 15:43:25)
Offline
#257 2007-11-29 16:25:56
Re: [Archived] stw_category_tree
vickilh-
I can’t really help you with the version 0.4 problem — I’m no longer providing support for anything before the current version.
However, I’d be interested to know what happens when you upgrade to the current version of the plug-in on TXP 4.0.5. What kind of errors, exactly, are you getting?
Thanks.
Offline
#258 2007-11-30 12:12:42
- Logoleptic
- Plugin Author

- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: [Archived] stw_category_tree
If there’s anyone else out there who wants to get this working with the clean “section/category” URLs produced by the rss_unlimited_categories plugin, here’s one way. Change the stw_cat_link function to this:
function stw_cat_link ($cat,$sec,$title) {
global $sgb_url_handler_cfg;
$cat_link = pagelinkurl(array('c'=>$cat, 's'=>$sec));
if ( !empty($sec) && $sec!='default' && $permlink_mode!='messy' ) {
if ($sgb_url_handler_cfg) {
$cleanurl = sgb_url_handler_config();
if ($cleanurl['schemes']['section_category'] == "%section%/%category%") {
$cat_link = hu.urlencode($sec)."/".urlencode($cat);
}
} elseif ( function_exists('rss_uc_list') ) {
$cat_link = hu.urlencode($sec)."/".urlencode(strtolower($cat));
}
}
return tag(htmlspecialchars($title),'a',' href="'.$cat_link.'" title="'.htmlspecialchars($title).'"');
}
Changes begin on the 5th line.
Offline
#259 2007-11-30 13:54:03
- Logoleptic
- Plugin Author

- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: [Archived] stw_category_tree
I have a new problem: the plugin won’t recognize the currently-viewed category and apply a class accordingly. At first I thought the problem was the plugin’s assumption that an article will have a Category 1 (which isn’t the case with the unlimited categories plugin), so I made the following change (this is for Paul’s version):
// from this:
$thiscat = $thisarticle ? $thisarticle['category1'] : ($pretext['c'] ? $pretext['c'] : $start);
//to this:
$thiscat = $thisarticle ? $thisarticle['c'] : ($pretext['c'] ? $pretext['c'] : $start);
But that hasn’t done me any good. Does anyone have a suggestion for how I might fix this?
Offline
#260 2007-12-07 21:16:41
Re: [Archived] stw_category_tree
Hi all,
This plugin is perfect for me except for one thing: I’d like to show even empty categories (no problem) but only LINK the ones that aren’t empty. Anyone know if this is possible? Or how I could hack it?
Thanks.
Offline
#261 2007-12-08 17:35:12
Re: [Archived] stw_category_tree
Nora-
Good idea. I’ll put this on the feature list for the next version. (Though no promises about when that’ll be.)
-S
Offline
#262 2008-01-16 12:02:54
- SebastianS
- Member
- From: Australia
- Registered: 2007-10-05
- Posts: 46
Re: [Archived] stw_category_tree
Hi,
I’m trying to work out how to use stw_category_tree 1a.2.
Looking at my site:- webdevelopmentnotes.com I want to have control over the style of the child categories of the Textpattern parent category (Txp-Tags, TXP Resources).
So I suppose I am asking how I put a class style tag into the child categories so I can control text size and whatever else.
Looking at the HTML I see <li id=“cat-tags”><span><a href=“http://webdevelopmentnotes.com/articles/?c=tags” title=“Txp-Tags”>Txp-Tags</a></span></li>
and i add
.cat-tags { color: #34525A; font-size: 1.2em; } to the style sheet but it does nothing.
So really I’m asking a CSS question.
Offline
#263 2008-01-16 12:47:10
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: [Archived] stw_category_tree
you’re addressing an id (#) as a class (.) Try #cat-tags { color: #34525A; font-size: 1.2em; }
Last edited by uli (2008-01-16 12:55:42)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#264 2008-01-16 23:18:00
- SebastianS
- Member
- From: Australia
- Registered: 2007-10-05
- Posts: 46
Re: [Archived] stw_category_tree
<ul><li> Thank you for pointing that out to me, that fixed the problem, and brought up more questions for me, so I’ll carefully read the plugin notes before I ask anymore.
Offline
#265 2008-03-30 10:06:14
- Jaro
- Member

- From: S/F
- Registered: 2004-11-18
- Posts: 89
Re: [Archived] stw_category_tree
Is there any way to use the tag as following?
<txp:stw_category_tree wraptag="p" break=", " count="[]" />
This is possible with the native category_list tag but stw_category_tree interprets break=", " as <,>.
Any ideas how to force it to use comma as a break parameter?
Offline
#266 2008-05-25 22:20:11
Re: [Archived] stw_category_tree
@Paul_U
Hi Paul_U – when I’m using the option killempties="0" in “your version of stw_category_tree “ I have the problem , that i dont see anything, only if I set this to “0” then my menu items appears…
have you ever heard about this problem…
Last edited by darche (2008-05-29 20:11:52)
Offline
#267 2008-06-17 12:29:31
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [Archived] stw_category_tree
Anyone have a copy of stw_category_tree 1a.2 they care to let me have please?
Thanks
Lee
Offline
#268 2008-06-17 14:17:51
Re: [Archived] stw_category_tree
i have 1.a.1 if it’s any use
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
#269 2008-06-17 14:21:48
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [Archived] stw_category_tree
Thanks. Another kind sole sent it to me.
Offline
#270 2008-07-09 00:46:39
Re: [Archived] stw_category_tree
mrdale wrote:
fuls wrote:
Is it possible to use some kind of category list sorting with this plugin?
Not as such, although you can use the category “name” for ordering and the “title” for display. So you could do the following…
- category title=“people” and name=“01-people”
- category title=“animals” and name=“02-animals”
to list people before animals in a list.
That is bloody genius – just saved my butt big-time – thanks.
Offline