Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Article list, display penultimate article
Hi,
If this it’s been answered before, sorry. I’m sure it’s so easy, but I couldn’t find the way to do it.
How can I display only the penultimate article?
Thank you :)
Offline
Re: Article list, display penultimate article
Assuming you mean not the most recent article, but the second one.
<txp:article_custom limit="2" form="myform" />
myform:
<txp:if_first_article><!-- skip --><txp:else /><!-- show article --></txp:if_first_article>
Offline
Re: Article list, display penultimate article
Does this mean that I can do the same with the third, the forth, and so on?
Thank you very much :)
Offline
Re: Article list, display penultimate article
Nope, because there is no such thing as a <txp:if_second_article />
tag.
If you wanted to do something like that, then:
second article: <txp:article offset="1" limit="1" />
third article: <txp:article offset="2" limit="1" />
fourth article: <txp:article offset="3" limit="1" />
Offline
Re: Article list, display penultimate article
Oh, this one is perfect, thank you very much :)
Offline