Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-10 16:55:07

tennapel
Member
Registered: 2009-05-31
Posts: 62

Retrieve all articles from one year

In the article_custom tage there is a month= filter, but how do I select the 5 last articles from one specific year? (where the posted date indicates the year)

Offline

#2 2009-09-10 18:04:42

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: Retrieve all articles from one year

Not sure but If I recall correctly you can simply write posted="2008".
In your case:


<txp:article_custom posted="2008 desc" limit="5" >

edit
Oops after a few hours I realize I made a mistake. Of course I meant “month” instead of “posted”

Last edited by redbot (2009-09-10 23:20:06)

Offline

#3 2009-09-10 19:24:22

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: Retrieve all articles from one year

Use the month tag with the year only:

<txp:article_custom month="2008"/>

You can use it also with a day:

<txp:article_custom month="2008-12-30"/>

Offline

#4 2009-09-10 20:33:02

tennapel
Member
Registered: 2009-05-31
Posts: 62

Re: Retrieve all articles from one year

juanjonavarro wrote:

Use the month tag with the year only:

<txp:article_custom month="2008"/>

Thank you! that works indeed. Maybe someone can update the textpattern article_custom_tag page? It’s not documented.

Offline

#5 2009-09-10 21:49:30

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Retrieve all articles from one year

tennapel wrote:

Maybe someone can update the textpattern article_custom_tag page? It’s not documented.

Done.

Offline

#6 2009-09-10 22:00:59

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: Retrieve all articles from one year

Thank you, Els :)

Offline

Board footer

Powered by FluxBB