-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Stuart Johnston <saj at thecommune.net> [2003-06-16 09:48]:
> [% PROCESS head IF head %]
> 
> But this IF never seems to be true, even when the block has been defined.

IF works on variables, but BLOCKs are not variables.  You could define
a variable 'head', along with the block head, like so:

  [% head = 1 %]
  [% BLOCK head %]
    blah blah blah
  [% END %]

But that's error prone.

> Can someone suggest the right syntax for this?

Wrap the PROCESS in a TRY:

  [% TRY; PROCESS head; END %]

(darren)

- -- 
Of all the strange 'crimes' that human beings have legislated out of
nothing, 'blasphemy' is the most amazing--with 'obscenity' and
'indecent exposure' fighting it out for second and third place.
    -- Lazarus Long
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+7f5uzsinjrVhZaoRAnlwAJ0ecnsW1QuUi6+gw+8Z0kxXUYpTUQCfTL9f
TkoUeMFx7gQvhmpZlS5/jOU=
=wHpG
-----END PGP SIGNATURE-----

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to