[Petal] 'Else' without using the ugly syntax

Michele Beltrame mb at italpro.net
Fri Dec 19 11:07:47 GMT 2003


Hi all!

I'm fairly new to Petal (I read about it on TPJ and was very curious about
it). I'm mostly a web coder, and I work in Italy. Until now I've been using
HTML::Template, but I'm planning almost all future works in Petal, which
seems superior.

Anyhow, I'm writing here also because I have a question. ;-) What I
want to do is to implement an 'else' in conditions without using the
"ugly syntax". I solved as follows:

<span tal:condition="true:id">Modifica entry</span>
<span tal:condition="false:id">Aggiungi entry</span>

This works, and is even nice to see. However, is there any way to
create 'else' statements with the TAL syntax? I wasn't able to
figure that out from the documentation.

	Thanks in advance, Michele.

-- 
Michele Beltrame
http://www.italpro.net/mb/
ICQ# 76660101 - e-mail: mb at italpro.net


More information about the Petal mailing list