[SMARTY] combination of if and literal
| From: | Fritzek | Date: | Fri, 07 Mar 2003 08:56:04 +0000 |
| Subject: | [SMARTY] combination of if and literal | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8472@lists.php.net to get a copy of this message | ||
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