8 Aug
2010
8 Aug
'10
11:43 a.m.
On 8 August 2010 22:33, Nitesh Rijal <rijal.it@gmail.com> wrote:
Actually, I have the value as TRUE and FALSE. Isn;t there anyway to execute the code of it is TRUE like: if (fulltetxt == TRUE) do this else do this This is what I need, I have no idea how to set a variable true or false before passing to the template.
No you can't do that, you can use TMPL_EXPR but this is unsafe, the only safe way to do it is to not set the variable to false, but just to empty. my $fulltext=''; if (some condition){ $fulltext = 1; } $template->param('fulltext' => $fulltext); Then in the template <!-- TMPL_IF NAME="fulltext" --> Chris