Smarty variable in JS and CSS files
| From: | Daniil Kaltchenko | Date: | Sat, 16 Nov 2002 11:31:32 +0000 |
| Subject: | Smarty variable in JS and CSS files | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6447@lists.php.net to get a copy of this message | ||
Hi,
Saturday, November 16, 2002, 2:02:44 PM, you wrote:
R>> Okay, finally trying to do some real work with Smarty. I can't find
R>> anything the manual about how to escape out the Smarty '{' and '}'
R>> in templates (like when doing CSS commands). I know you can change
R>> those characters, but how do you just escape out the occasional one?
R>> I tried backslashing them out, and doubling up on them. But,
R>> neither seemed to work.
BD> I just use the {literal} {/literal} tag. For almost all my
BD> stylesheets, i use an external file, so i don't have that problem.
And what to do, if it would be desirable, that JavaScript and
CSS were in external files, but in them it is necessary to use
variables Smarty? For example for colors in CSS or paths in
JavaScript... There Were ideas associate .css and .js files with
PHP that in them it was possible to process other patterns with help
Smarty and to return as usual CSS or JS, there are other ideas?
--
Daniil