Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-12-21 11:34:56

keoshi
Member
From: Portugal
Registered: 2006-04-30
Posts: 53

Display only latest article for each category

Hey gang,

It is possible to display, using a specific form, only the latest article of each and every category?

Thanks in advance,
F

Offline

#2 2010-12-21 12:08:49

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Display only latest article for each category

<txp:category_list wraptag="dl" break="">
<txp:article_custom category='<txp:category />' limit="1" break="">
<txp:category wraptag="dt" />
<dd><txp:permlink><txp:title /></txp:permlink></dd>
</txp:article_custom>
</txp:category_list>

Adjust HTML markup to taste.


Code is topiary

Offline

#3 2010-12-21 12:13:31

keoshi
Member
From: Portugal
Registered: 2006-04-30
Posts: 53

Re: Display only latest article for each category

Of course, wrapping the category=’<txp:category />’ inside a txp:category_list makes absolute sense!

You’re the man, thanks a bunch.

Offline

Board footer

Powered by FluxBB