Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-07-28 12:56:58
- jano
- Member
- Registered: 2008-01-09
- Posts: 23
Output some HTML markup after each x (say 2 or 3) articles?
Hi,
When looping through an article list, how could I output some markup (a static HTML snippet) after each “x” articles.
Basicaly what I’m trying to do is to ouput a clearing element after each row which contains 2 floated elements (articles).
Please, don’t suggest to change the HTML/CSS markup. It’s not an option.
Any suitable plugin?
Thank you!
Offline
#2 2008-07-28 13:18:23
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Output some HTML markup after each x (say 2 or 3) articles?
No plugin needed: txp_article offers the handy offset and pageby attributes
Last edited by masa (2008-07-28 13:18:48)
Offline
Re: Output some HTML markup after each x (say 2 or 3) articles?
There is a plugin : zem_nth
Offline
#4 2008-07-28 14:47:56
- jano
- Member
- Registered: 2008-01-09
- Posts: 23
Re: Output some HTML markup after each x (say 2 or 3) articles?
Dragondz, that zem_nth plugin looks exactly what I was looking for. Thanks!
I hope it still runs on TXP 4.06
masa wrote:
No plugin needed: txp_article offers the handy offset and pageby attributes
I’m afraid you haven’t understand exactly what I was asking for:
|article_1| |article_2|
<div class="clear"></div>
|article_3| |article_4|
<div class="clear"></div>
|article_5|
That is, outputing the <div class="clear"></div>
HTML snippet after each row of 2 articles.
Offline
#5 2008-07-28 15:32:50
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Output some HTML markup after each x (say 2 or 3) articles?
jano wrote:
I’m afraid you haven’t understand exactly what I was asking for:
I see – good you got the right answer :-)
Offline
#6 2008-07-29 09:52:53
- jano
- Member
- Registered: 2008-01-09
- Posts: 23
Re: Output some HTML markup after each x (say 2 or 3) articles?
Just to let you know that the plugin worked seamlessly, outputting the clearing div after each row of 2 articles:
<txp:zem_nth step=2 of=2><div class="clear"></div></txp:zem_nth>
Great plugin!
Offline