Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-26 19:45:46

alittle116
Member
From: Brooklyn
Registered: 2005-09-14
Posts: 72
Website

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.

txp:if_different


- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -

Offline

#3 2007-01-26 20:48:31

alittle116
Member
From: Brooklyn
Registered: 2005-09-14
Posts: 72
Website

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

#5 2007-01-28 00:21:40

alittle116
Member
From: Brooklyn
Registered: 2005-09-14
Posts: 72
Website

Re: list all categories and all relevant article titles

excellent. thank you

Offline

Board footer

Powered by FluxBB