Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-03-08 03:01:52
- ABL
- Member
- Registered: 2010-03-08
- Posts: 17
Would like to have 2 different formats for alternating articles
Hi! I would like to set up a system whereby I could have, for example, the odd numbered articles with the picture on the left and the text flush right next to it, and the even numbered articles with the picture on the right and the text flush left.
I imagine I could do this with categories at post time, but I would be thrilled if this could be done automatically, in case an article gets removed from the middle, for example.
Any help (including a kick in the right direction) would be appreciated.
Thanks!
Offline
Re: Would like to have 2 different formats for alternating articles
How about using <txp:variable />
and <txp:if_variable />
in the appropriate article form to toggle between successive articles and the CSS classes that floats the image left and then right?
Last edited by joebaich (2010-03-08 04:16:33)
Offline
Re: Would like to have 2 different formats for alternating articles
Here’s an article entitled fun with zebras by wet that explains the principle Joe means in more detail.
TXP Builders – finely-crafted code, design and txp
Offline
Offline
#5 2010-03-08 16:25:26
- ABL
- Member
- Registered: 2010-03-08
- Posts: 17
Re: Would like to have 2 different formats for alternating articles
Thanks. Hopefully, between jakob and jstubbs, I can figure this out. Thanks, also to joebaich for getting the ball rolling and pointing me in the right direction!
Offline
#6 2010-03-10 00:58:52
- ABL
- Member
- Registered: 2010-03-08
- Posts: 17
Re: Would like to have 2 different formats for alternating articles
jakob’s link worked like a charm. Thanks, again.
Offline