Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-02-04 20:34:30
- dcsfootball
- New Member
- Registered: 2008-01-28
- Posts: 6
Tag to display recent article(s)
I’m setting up the main content section of my site inside of a news scroller. I can place anything inside of the scroller, as long as it’s in <div> tags. I want to put my most recent articles in the scroller, maybe three or four. Is there any way I can set a text pattern tag to display the most recent article, the second-most recent article, etc.?
As an alternative, is there any way I can just set the newer articles to go straight into the scroller?
EDIT: I’m looking on the Textbook right now, trying to learn about the TP tags. Could I utilize this in some way?
<txp:article sort=“AuthorID asc, Posted asc” /> Except have the sort limit to one and set to most recent? I’m guessing that’s possible, but I don’t know how I would set the second and third most recent articles in their own separate page on the scroller.
Here’s the scroller I’m trying to implement:
http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm
Last edited by dcsfootball (2008-02-04 20:39:03)
Offline
Offline
#3 2008-02-04 21:04:20
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Tag to display recent article(s)
If you need to call the articles one by one:
1. <txp:article limit="1" />
2. <txp:article limit="1" offset="1" />
3. <txp:article limit="1" offset="2" />
etcetera
You don’t need the sort attribute, default is Posted desc.
Offline
#4 2008-02-04 21:41:10
- dcsfootball
- New Member
- Registered: 2008-01-28
- Posts: 6
Re: Tag to display recent article(s)
Thanks, guys. That will help out tremendously.
Offline
Pages: 1