Fw: [SMARTY] combination of if and literal
| From: | Jason Sweat | Date: | Fri, 07 Mar 2003 12:09:48 +0000 |
| Subject: | Fw: [SMARTY] combination of if and literal | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8477@lists.php.net to get a copy of this message | ||
Hi Fritzek,
From your problem description, it sounds like the script was always
interpreting:
{ if ($usescript == 'Y') }
as true. Did you try
{if $usescript eq "Y"}
?
HTH
Jason
----- Original Message -----
From: "Fritzek" <fthielem@mplace.de>
To: <smarty-general@lists.php.net>
Sent: Friday, March 07, 2003 2:56 AM
Subject: [SMARTY] combination of if and literal
> Hi folks,
>
> I have a template which should only provide a piece of javascript to one
> php-file. I have assigned a variable called usescript and filled with 'Y'.
> in the template I have the following code snippet
>
> { if ($usescript == 'Y') }
> {literal}
> <SCRIPT>
> ...
> </SCRIPT>
> {/literal}
> { /if }
>
> But the javascript will be perfomed for all php-file (with or without
> usescript) :(
>
> Whats wrong on my code?
>
> Thanks in advance
>
> Fritz Thielemann
>
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>