Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2004-09-27 21:05:13

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: [Archived] stw_category_tree

Correct me if I’m wrong or misunderstanding the attribute tags already available, but shouldn’t

<code>$section = (empty($section)) ? “” : $section;<code>

be

<code>$section = (empty($section)) ? $GLOBALS[‘s’] : $section;</code>

That way, if you’re including the category list in a form that is replicated on all pages, including section pages, the category links will stay relative to the currently-viewed section.

Last edited by compooter (2004-09-27 21:06:14)

Offline

#38 2004-10-02 20:50:05

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [Archived] stw_category_tree

Could someone post some example tags?

I would like to display only the catagories that are in the currently viewed section and can’t seem to get any functionality other than a complete tree list with subcatagories included.

Thanks
Jamie

Offline

#39 2004-10-05 16:59:05

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [Archived] stw_category_tree

i seem to be having the same problem. i’ve done what compooter suggested in order to default the section to the current section and that works great. i expected to be able to do the same with the start tag but its not working.

what i’ve done is setup a parent category with the same name as my section. that category has several sub-categories. i’d like for each section to display a list of sub-categories that are in the parent category that matches the section name however this doesn’t seem to do the trick:
<code>
$start = (empty($start )) ? $GLOBALS[‘s’] : $start ;
</code>

any ideas? thanks for the help…

Offline

#40 2004-10-10 23:10:30

santheo
Archived Plugin Author
From: Chicago
Registered: 2004-05-27
Posts: 62
Website

Re: [Archived] stw_category_tree

compooter wrote:
> Correct me if I’m wrong or misunderstanding the attribute tags already available,
> but shouldn’t

You are not wrong. The code and original post has been updated. Good catch.

wilshire wrote:
> what i’ve done is setup a parent category with the same name as my section.
> that category has several sub-categories. i’d like for each section to display a list
> of sub-categories that are in the parent category that matches the section name
> however this doesn’t seem to do the trick:

Wilshire, I’ve added a feature to the <code>start</code> attribute so you can hack the system this way. If you set <code>start</code> to be “*s”, the code will define <code>start</code> as the current section.

Similarly, now if you set <code>start</code> to “*”, the code will define <code>start</code> as the current category.

Last edited by santheo (2005-07-09 16:53:40)

Offline

#41 2004-10-10 23:24:44

santheo
Archived Plugin Author
From: Chicago
Registered: 2004-05-27
Posts: 62
Website

Re: [Archived] stw_category_tree

soulship wrote:
> I would like to display only the catagories that are in the currently viewed section
> and can’t seem to get any functionality other than a complete tree list with
> subcatagories included.

Jamie-

I’m a little confused about your situation. Category and sections are not interrelated. So it isn’t really possible to say that categories are within a certain “section.” That said, if you’re doing what wilshire is doing, and defining your top-level categories to be the same as your section names, you can set the <code>start</code> attribute to “*s” in order to only display the categories beneath the category that’s defined as the current section. Does that make sense?

You can also set the <code>start</code> value to “*” to in order to only display the categories under the current cateogry.

Offline

#42 2004-11-15 03:28:37

arakune
Member
Registered: 2004-10-23
Posts: 13

Re: [Archived] stw_category_tree

I’m not certain if my question pertains specifically to category_tree, or more generally to the way TXP handles subcategories, but thought I’d ask here since I’m using the category_tree plugin. if this is the wrong place, let me know ;)

I’m using category_tree to display a particular branch of my category tree, and am wondering if its possible to have a parent category link to an index of all of its children categories.

For example, I have

Category 2
-subcategory 4
-subcategory 5

Clicking on -subcategory 4, obviously, presents an index page of the most recent posts in subcategory 4.

Clicking on Category 2, on the other hand, presents an index page of the most recent posts explicitly in Category 2. What I would like is for it to present an index of the most recent posts in Category 2, subcategory 4 and subcategory 5 (i.e., the entire tree beginning with Category 2).

Is this possible?

Last edited by arakune (2004-11-15 03:29:27)

Offline

#43 2004-11-29 23:55:35

dbulli
Member
Registered: 2004-11-22
Posts: 195
Website

Re: [Archived] stw_category_tree

Santheo I changed your plugin sligthly for my site to output “c/category” vs “?c=category” as textPattern seemed a little broken for not having this be a clean url.

Maybe a future version can have a parameter for clean=“true” to output something like that.

in action: nuff-respec.com/technology/c/php

Last edited by dbulli (2004-11-30 00:30:06)


nuff-respec ::: dannyb

Offline

#44 2004-12-16 15:32:16

leeopold
New Member
Registered: 2004-03-05
Posts: 3
Website

Re: [Archived] stw_category_tree

Is there a quick and easy way to get a count of the aricles in each category listed? I currently have:

<txp:stw_category_tree start="posts" prune="true" />

Which displays a nice list of categories that are children of “posts”.

Any way to get it to list it as such:

Books (1)
Surf (2)
Bored (5)
Observed (0)

Last edited by leeopold (2004-12-27 00:00:38)

Offline

#45 2004-12-24 23:44:55

alice_c
Plugin Author
From: Karlsruhe, Germany
Registered: 2004-07-03
Posts: 33

Re: [Archived] stw_category_tree

Wasn’t there an posibility to output the categories as selectbox, like <txp:popup />? I think I have seen this on a txp-site…

Offline

#46 2005-01-25 11:13:24

Benvolio
Member
From: Sydney
Registered: 2004-10-07
Posts: 11
Website

Re: [Archived] stw_category_tree

Hey Santheo,

this is a great help this plugin… is there a similar one for link categories?

Looking forward too your response,
Benvolio

Offline

#47 2005-02-03 19:38:13

andrea
Member
From: la la land
Registered: 2004-02-24
Posts: 62
Website

Re: [Archived] stw_category_tree

ah, i give up – i need help!

i’ve been trying to get this plugin to work, and it outputs fine, but i’m starting to think i’ve mis-understood txp incredibly and/or structured my site horribly…. !

as seen in the test section of my site (mellowtrouble.net/test), displayed are the sub-categories for the category ‘books reviewed’, to be displayed in my library section (mellowtrouble.net/library).

so, when i click on any of the sub-categories on my test page, the output is correct, i believe, with: mellowtrouble.net/library/?c=kids+bks for example.

but instead what i get is an output of all books reviewed, which is the default output for that section. agh.

i’m sure i’m missing something super obvious – any help would be really appreciated.

edit: yahooo! never mind, figured it out thank’s to zem’s excellent post on (embarassingly enough) ‘common textpattern issues’ (thresholdstate.com/threshold/3655/). every single page of mine was using article_custom, so once i changed that to txp:article, all was well!

Last edited by andrea (2005-02-04 00:07:40)

Offline

#48 2005-02-17 04:09:49

supa
Archived Plugin Author
Registered: 2005-02-10
Posts: 27
Website

Re: [Archived] stw_category_tree

santheo,

I’d like to refer you to the last couple posts in this thread. I think there’s a bug in stw_category_tree?

-Steve

Offline

Board footer

Powered by FluxBB