You are not logged in.
Try wet_quicklink | Me | @rwetzlmayr | +Robert Wetzlmayr | Repos
Offline
Last edited by iblastoff (2008-07-02 10:18:07)
Offline
Yes wet, very useful for those that don’t do stripes in jQuery.
In the same vein… untested but should work if I’ve understood the syntax:
<txp:variable name="plural" value='<txp:comments_count />' />
<p>
<txp:comments_count /> comment<txp:if_variable name="plural" value="1"/><txp:else />s</txp:if_variable> so far.
</p>
Last edited by Bloke (2008-07-02 10:23:37)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern.
Txp Builders – finely-crafted code, design and Txp
Offline
iblastoff wrote:
I think the original base is the Registry Pattern. At least, this is what I had in mind.
Try wet_quicklink | Me | @rwetzlmayr | +Robert Wetzlmayr | Repos
Offline
Very sweet little examples for txp_var, Robert and Stef. I’m beginning to see the light ;)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Would this give just todays articles, then?
<txp:variable name="today" value='<txp:php>echo date("Y-m-d");</txp:php>' />
<txp:if_variable name="today" value="<txp:posted format="%Y-%m-%d" />"/>
<txp:output_form form="my_article" />
<txp:else />
No events today!
</txp:if_variable>
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
At first glance, this is almost working. if_variable receives a Textpattern tag as the attribute’s value, so you would need to enforce parsing with single quotes around <txp:posted format="%Y-%m-%d" />.
<txp:variable name="today" value='<txp:php>echo date("Y-m-d");</txp:php>' />
<txp:if_variable name="today" value='<txp:posted format="%Y-%m-%d" />' />
<txp:output_form form="my_article" />
<txp:else />
No events today!
</txp:if_variable>
Try wet_quicklink | Me | @rwetzlmayr | +Robert Wetzlmayr | Repos
Offline
uli wrote:
… I’m beginning to see the light ;)
Well now I can see the light fully. It’s strange but as soon as I read wet’s odd/even example my brain switched to “php mode” and all became clear in a second. Very strange, previously I had an hard time understanding… probably it’s me being completely brain-dead.
Anyway – as ever – thanks, very appreciated
Offline