On 8 August 2010 22:33, Nitesh Rijal <[email protected]> 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
_______________________________________________
Koha-devel mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel