[EMAIL PROTECTED] wrote:
>> I've now published my version of the {(...)} markup as a recipe, 
>> available at 
>>
>>     http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
>>
>> The description on the recipe page only scratches the surface of 
>> what the recipe can do.

Nicely done, Pm!  I particularly like how if you label the arguments, 
you can use them out of order, because with PHP functions I'm forever 
forgetting which order they're supposed to go in and have to look them 
up in the documentation every blessed time.

With some tweaking of the Markup definitions, this recipe might be able 
to coexist peacefully with the existing {( ? : )} ternary logic markup 
used in SelectQuery for the past year.  Or a variant of that markup, 
compatible with PmWiki's conditionals, could be included in 
MarkupExpressions.  I envision something like,

Christmas is {(gt 2007-12-25 (ftime "%F" now) ? coming! : past!)}

which otherwise would have to be written as

Christmas is
(:if gt 2007-12-25 {(ftime "%F" now)}:)coming!
(:else:)past!
(:ifend:)

Would that be useful?  Or should SelectQuery try to phase out its 
ternary markup to avoid confusion with the new recipe?  --Ben

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to