Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-06-12 15:51:27

qaisc
Member
Registered: 2008-06-10
Posts: 13

category listing of articles

hello,

i just want to list a particular category with all it’s articles sorted with dates and author name.
this is what i have so far

form/sidebar

<li><txp:category name=“Poems” link=“1” section=“poems” type=“article”>Poems</txp:category></li>

pages/archive
<txp:if_section name=“poems”>
<txp:if_category name=“Poems”>
<h3 class=“posttitle” class=“categorytitle”><txp:category title=“1” /></h3>
<txp:recent_articles limit=“999” break=“br” wraptag=“p” class=“list” category=“Poems” label=”“/>
<hr size=“1px” align=center>
</txp:if_category>
</txp:if_section>

it’s very messy but it does give a link based article list sorted by newest on top. how would i get the date and poster in there also?

-qais

Offline

#2 2008-06-12 16:14:45

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: category listing of articles

See:

So, we get something like:

<p><txp:article_custom limit="999" category="Poems" form="list" /></p>

And to the list form:

<txp:permlink><txp:title /> - <txp:posted /> by <txp:author /></txp:permlink><br />

Offline

#3 2008-06-12 19:09:54

qaisc
Member
Registered: 2008-06-10
Posts: 13

Re: category listing of articles

thank you, it worked perfectly. my list form looks like this now

<li><span class=“entry-title”><txp:permlink><txp:title /></txp:permlink></span> &#183; <span class=“published”><txp:posted format=”%Y-%m-%d” /></span>
&#183; by <txp:author />
</li>

Offline

Board footer

Powered by FluxBB