Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-11-17 00:16:51
- Cap'n Refsmmat
- New Member
- Registered: 2006-10-21
- Posts: 9
Displaying a list of categories underneath the current category
Right now I’m struggling with a seemingly simple question: how do I display a list of articles underneath the current category?
For example, let’s suppose I have a category structure like this:
-Foo
—Example
-Bar
When I browse to category Foo to see the articles it contains, I’d like to see a page that shows that Example is a subcategory of it, and then a list of articles in category Foo.
Is there an easy way to do this? If I need to make a quick plugin, I can handle that.
Offline
#2 2006-11-17 00:51:36
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Displaying a list of categories underneath the current category
<txp:if_category name="foo">
<txp:category_list parent="foo" />
<txp:article />
</txp:if_category>
Offline
#3 2006-11-17 01:09:43
- Cap'n Refsmmat
- New Member
- Registered: 2006-10-21
- Posts: 9
Re: Displaying a list of categories underneath the current category
Doesn’t that require me to do that for each and every category I have that contains subcategories?
Offline
#4 2006-11-17 02:52:11
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Displaying a list of categories underneath the current category
Yep. Alternative is to grab asy_wondertag, and do:
<txp:if_category>
<txp:asy_wondertag><txp:category_list parent="<txp:category />" /></txp:asy_wondertag>
<txp:article />
</txp:if_category>
Offline
#5 2006-11-18 01:22:44
- Cap'n Refsmmat
- New Member
- Registered: 2006-10-21
- Posts: 9
Re: Displaying a list of categories underneath the current category
Ah, it works!
Now I just have to make it pretty…
Offline