Re: [SMARTY] combination of if and literal
| From: | messju mohr | Date: | Fri, 07 Mar 2003 08:39:26 +0000 |
| Subject: | Re: [SMARTY] combination of if and literal | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8473@lists.php.net to get a copy of this message | ||
On Fri, Mar 07, 2003 at 09:56:04AM +0100, Fritzek wrote:
> 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 }
>
use {if ...}, not { if ...}.
HTH
messju
> 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
--
Torx-Schrauben: Hände-Weg-Schrauben
nach Marc Habers Kollegen