[Koha] Need Help in Template code

Nitesh Rijal rijal.it at gmail.com
Mon Aug 9 18:00:36 NZST 2010


Well....

That worked :).

Thanks for everyone for your help and coordination.

Regards.

On Mon, Aug 9, 2010 at 3:59 AM, Bernardo Gonzalez Kriegel <
bgkriegel at gmail.com> wrote:

> Hi,
>
> as explained on
> http://search.cpan.org/~samtregar/HTML-Template-2.9/Template.pm#TMPL_IF
> you need to pass a variable whose value is true or false to PERL, for
> example
>
> <!-- TMPL_IF NAME="fulltext"-->
>  Show if true
> <!-- TMPL_ELSE -->
>  Otherwise
> <!-- /TMPL_IF -->
>
> would work if "fulltext" has values "1" (true) or "0" (false). From
> the point of view of PERL, "TRUE" and "FALSE" are true.
>
> You will need to set apropriate values, following the example
>  $template->param( fulltext => '1'); # for true
>  $template->param( fulltext => '0'); # for false
>
> Hope that helps.
>
> Bernardo
>
> 2010/8/8 Nitesh Rijal <rijal.it at gmail.com>:
> > Hello all.
> >
> > I am trying to display a link only if one variable has TRUE. For this I
> have
> > the following:
> >
> > <!-- TMPL_VAR NAME="fulltext" --> gives me either TRUE or FALSE
> >
> > what should the <!-- TMPL_IF --> look like, so that if it is TRUE then IF
> > block is displayed otherwise ELSE block is displayed.
> >
> > Please Help.
> >
> > Regards.
> >
> > Nitesh Rijal
> > BE IT
> > rijal.it at gmail.com
> > http://niteshrijal.com.np
> > http://facebook.com/openrijal
> > http://twitter.com/openrijal
> > +9779841458173
> >
> > _______________________________________________
> > Koha mailing list
> > Koha at lists.katipo.co.nz
> > http://lists.katipo.co.nz/mailman/listinfo/koha
> >
> >
>



-- 
Nitesh Rijal
BE IT
rijal.it at gmail.com
http://niteshrijal.com.np
http://facebook.com/openrijal
http://twitter.com/openrijal
+9779841458173
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20100809/821fa07e/attachment.htm 


More information about the Koha mailing list