Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-05-23 08:43:37
- ephi
- New Member
- Registered: 2007-04-23
- Posts: 7
generate different display for odd and even entries
I want to get a 4 entries of output like this:
<ul>
<li>Entry 1, entry_id:xxx</li>
<li class=“even”>Entry 2, entry_id:yyy</li>
<li>Entry 3, entry_id:www</li>
<li class=“even”>Entry 4, entry_id:zzz</li>
</ul>
Currently, this is what I have
<ul>
<li>Entry 1, entry_id:xxx</li>
<li>Entry 2, entry_id:yyy</li>
<li>Entry 3, entry_id:www</li>
<li>Entry 4, entry_id:zzz</li>
</ul>
How do I achieve what I want?
keywords: entries like zebra table, odd and even entry
BTW, why does the search form in this forum doesn’t return the result I search for, that I have to use google? I spent 15 minutes yesterday to find out how to discard the paragraph tag from the excerpts, by actually reading posts in the forum, because the search form return irrelevant results.
Offline
Re: generate different display for odd and even entries
Try the zem_nth plugin
Last edited by ruud (2007-05-23 09:09:21)
Offline
#3 2007-05-24 06:55:02
- ephi
- New Member
- Registered: 2007-04-23
- Posts: 7
Re: generate different display for odd and even entries
Ouuch, thanks Ruud.
I’m trying to imagine if there’s another way to do that.
Offline
#4 2007-05-25 01:34:03
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: generate different display for odd and even entries
I’m trying to imagine if there’s another way to do that.
Not really. You could do it through CSS, but it doesn’t work on all browsers. You could also do it with CSS + JavaScript (starting at slide 14).
Offline