[pmwiki-users] Conditional markup to see if an include parameter is set
Patrick Provinciael
patrick.provinciael at gmail.com
Fri Jan 8 10:10:28 CST 2010
I've been toying around with include variables to create easy to use
templates. The last hurdle was making variables optional. so I started
searching for a way. Apparently the conditional markup does not support
this.
For that reason I wrote a (simple) conditional to check if an include
parameter is actually set. I am sharing it with the community through this
way, because I am certain improvements can still be made to it. I hope it
serves some use to someone. Feel free to improve it and add it somewhere on
the pmwiki website.
So without further rambling, the markup to be added to your local config
file to check if an include parameter is set.
$Conditions['includevarset'] = 'substr(\$condparm, 0, 3) != "{\$\$"';
--
Patrick Provinciael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100108/a2b3dd7e/attachment.html
More information about the pmwiki-users
mailing list