Re[2]: Intelligent JavaScript handling
Dmitry Koteroff <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
MR> As to whether this is a specific Javascript issue - I don't think it is. For
MR> example, the following won't work:
MR> {literal}
MR> <style>
MR> .main {
MR> color: {$main.color};
MR> background-color: {$main.bgcolor};
MR> }
MR> </style>
MR> {/literal}
I use plugins to disable Smarty handling for { with spaces after
it:
# Quotes each "{" with spaces after it.
function smarty_prefilter_z_nonsmarty($source, &$smarty) {
$l = $smarty->left_delimiter;
$r = $smarty->right_delimiter;
$source = preg_replace('/'.preg_quote($l, '/').'(?=[\s{(\[])/s', "{$l}ldelim{$r}", $source);
return $source;
}
Maybe it would help?
--
Best regards,
Dmitry Koteroff.
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php