Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-09-29 23:03:19
- danfarr
- New Member
- Registered: 2010-05-03
- Posts: 9
<txp:if_last_article>/<txp:if_first_article> extensions?
Say I have 6 blocks on my home page, each block contains an article sorted to the most recently posted. I need to create 6 different classes which are applied to each block. Is there already existing functionality to get the following example:
<txp:if_first_article>
class=1
</txp:if_first_article>
<txp:if_second_article>
class=2
</txp:if_second_article>
<txp:if_third_article>
class=3
</txp:if_third_article>
etc….
I’ve only seen the <txp:if_last_article>/<txp:if_first_article> tags but I need something in between, maybe by dynamically filling in the article id??
I’m really stuck with this so please help!
Offline
#2 2010-09-29 23:15:00
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: <txp:if_last_article>/<txp:if_first_article> extensions?
I never used it but maybe adi_calc can help
Last edited by redbot (2010-09-29 23:15:19)
Offline
#3 2010-09-30 06:43:47
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: <txp:if_last_article>/<txp:if_first_article> extensions?
Or zem_nth.
Offline
#4 2010-09-30 09:31:06
- danfarr
- New Member
- Registered: 2010-05-03
- Posts: 9
Re: <txp:if_last_article>/<txp:if_first_article> extensions?
Managed to get it working perfectly with zem_nth. thanks everyone!
Offline