Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
list all categories and all relevant article titles
I would like to make a list like the example shown below, but i would also like to make this completely dynamic in the sense that if i add a new category in the future, it will automatically be added to this list. Thanks!
Category 1
Cat 1 Article Title 1
Cat 1 Article Title 2
Cat 1 Article Title 3
Cat 1 Article Title 4
Category 2
Cat 2 Article Title 1
Cat 2 Article Title 2
Cat 2 Article Title 3
Cat 2 Article Title 4
Cat 2 Article Title 5
Category 3
Cat 3 Article Title 1
Cat 3 Article Title 2
Cat 3 Article Title 3
Offline
#2 2007-01-26 20:17:56
- anoke
- Archived Plugin Author
- Registered: 2006-04-15
- Posts: 152
Re: list all categories and all relevant article titles
Article_custom and catching categories at form with <txp:if_different /> might be worth of try.
- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -
Offline
Re: list all categories and all relevant article titles
actually, before i worry about making it automatically update, i first need to understand how i can setup a form that has the category plus a list of articles….
Offline
#4 2007-01-27 09:28:04
- anoke
- Archived Plugin Author
- Registered: 2006-04-15
- Posts: 152
Re: list all categories and all relevant article titles
** page **
<txp:article_custom sort="Category1 asc, Title asc" limit="999" form="category_list_different"/>
** form: category_list_different **
<txp:if_different>
<h2><txp:category1 /></h2>
</txp:if_different>
<txp:permlink>
<txp:title />
</txp:permlink>
<br />
Bad: lists also articles without category at the beginning of list.
Good: lists also… (:
That’s the automatic way I’m aware of – there might be others too. Publisher has to be sure the category1 is set. I’m not sure if there is a way to select only articles with categories.. And you have no control over order of categories listed besides asc/desc ordering.
- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -
Offline
Re: list all categories and all relevant article titles
excellent. thank you
Offline