Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Topic closed
[archived] gho_alternation
Notice: This thread is archived, this plugin is no longer available.
**********************************************************
hi @all,
i needed the possibility to cycle through a given set of classnames for the articles of a page and found no suitable plugin, so here one is. hard to explain, but maybe the example will help to understand.
More info: grauhirn.org
attributes
returns
- what should be alternating returned? separated by comma here the values will be given through which the plugin will cycle.
example
<div class="entry<txp:gho_alternation returns="this,that" />">
returns the first time called class=“entrythis”, the second time class=“entrythat”, the third time class=“entrythis” and so forth.
History
2005-08-16 v.4.0- revised for TXP4.0
- messed up documentation fixed
- revised for TXP1.0
- fixed some annoyances with whitespaces and empty values
- initial version
Last edited by graumeister (2005-08-28 06:16:47)
Samui? Samui! (about the life as farang in thailand)
David’s Neighbour
Offline
Re: [archived] gho_alternation
i assume you could have a series of three or four or more?
wow, awesome idea. thanks.
Listen to Kenneth
Offline
Re: [archived] gho_alternation
this is probably like a jon hicks dream come true :p.. its great dude. thanks
Offline
#4 2005-05-04 14:08:36
- davidm
- Member
- From: Paris, France
- Registered: 2004-04-27
- Posts: 719
Re: [archived] gho_alternation
Whaow, this is g-r-e-a-t !
It’s not only a John Hicks dream come true, it’s a lot of textpatterner’s dream come true :-)
the gho plugins series has started ! I already liked gho_comments_invite, but this one is going to make style sheets a lot nicer :-))
Can’t wait to see what will be next :)
.: Retired :.
Offline
Offline
#6 2005-05-04 20:59:58
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: [archived] gho_alternation
FWIW, you can do this kind of thing with zem_nth.
Alex
Offline
#7 2005-05-04 22:28:52
- davidm
- Member
- From: Paris, France
- Registered: 2004-04-27
- Posts: 719
Re: [archived] gho_alternation
Yeah true, there are so many plugins to test (!)… I have tested and happily used almost every one of your plugins (love zem_contact, zem_ir and zem_dropcash), but missed zem_nth. I just checked the syntax of your plugin : isn’t gho_alternation more “straightforward” ?
I find it easier this way than the step=1 of=2, plus you don’t have to open and close a tag. Sure, zem_nth has probably more flexibility for this very same reason. You can choose different item to wrap into those tags :-) But for more simple purpose I guess this one will be easier…
Last edited by davidm (2005-05-04 22:33:45)
.: Retired :.
Offline
Re: [archived] gho_alternation
@kennethlove666: yes, as much items as you want
Samui? Samui! (about the life as farang in thailand)
David’s Neighbour
Offline
Re: [archived] gho_alternation
Hi all, I’ve updated the plugin to work with txp1.0 (rc5).
Samui? Samui! (about the life as farang in thailand)
David’s Neighbour
Offline
Re: [archived] gho_alternation
I just installed the plugin and the help is a bit messed up
[code]
h1. gho_alternation h2. description I needed an alternating counter or something which alternates between maybe some classes. This plugin will do it. h2. attributes returns – what should be alternating returned? separated by comma here the values will be given through which the plugin will cycle. h2. example
">
returns the first time called class=“entrythis”, the second time class=“entrythat”, the third time class=“entrythis” and so forth. h2. History 2005-08-14 v.1.0 * revised for TXP1.0 * fixed some annoyances with whitespaces and empty values 2005-05-04 v.0.1 * initial version
[/code]
Last edited by swf (2005-08-14 15:16:00)
Offline
Re: [archived] gho_alternation
aehem. ok. i look into it and try to correct it. its the same like in the post on top of this thread.
Samui? Samui! (about the life as farang in thailand)
David’s Neighbour
Offline
Re: [archived] gho_alternation
its fixed. thanks for the tip again.
Samui? Samui! (about the life as farang in thailand)
David’s Neighbour
Offline
Pages: 1
Topic closed