[pmwiki-users] [fox] only add new page when textarea is not empty

Martin Kerz mkerz at me.com
Tue Mar 9 09:43:56 CST 2010


You're my hero. 

Martin

Am 09.03.2010 um 16:42 schrieb Hans:

> Tuesday, March 9, 2010, 11:33:11 AM, Hans wrote:
> 
>> I ought to include processing of conditionals, so one can add a
>> condition inside the (:foxadd ...:) directive.
> 
> I released a new fox.php version which lets you use
> a if= conditional parameter
> inside Fox's special markups (:foxadd ...:), (:foxreplace ...:)
> (:foxptv ...:), (:foxcopy ...:), (:foxmail ...:)
> 
> If the condition is fullfilled, the target will be set. Otherwise
> the target unset, so the parameters added by such markup ignored.
> 
> So, for instance, to have no Kommentar page created when field
> 'kommentar' is empty, add
>   if="!equal {$$kommentar} ''"
> to the relevant foxadd markup:
> 
> (:foxadd if="!equal {$$kommentar} ''" template=VorlageKommentar
>    target=Kommentar-{$$SK}-{$$Nummer}_{$$name}:)
> 
> 
>  ~Hans
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3672 bytes
Desc: not available
Url : http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100309/052de243/attachment.bin 


More information about the pmwiki-users mailing list