Sorry, the first line should read

$def with(error_message='')



Bests, Dragan

Am 12.09.2013 09:12, schrieb Dragan Espenschied:
> In the template, use default values for variables:
> 
> $def(error_message='')
> 
> $if error_message:
>     <div class="alarm">$error_message</div>
> 
> Am 18.08.2013 15:42, schrieb [email protected]:
>> Hello,
>> How can i put optional parameters to templates and print them only if it 
>> passed
>> to the template during render. A good example for this would be error 
>> messages
>> which are printed only if some constraint is not satisfied.
>>
>> Regards,
>> Harish Badrinath
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups
>> "web.py" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email
>> to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/webpy.
>> For more options, visit https://groups.google.com/groups/opt_out.
> 

-- 
http://1x-upon.com/~despens/ >NEW!<
http://noobz.cc/
http://contemporary-home-computing.org/1tb/

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to