Re: Re: Intelligent JavaScript handling
"Mark Rogers" <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Organization | Quarella Ltd |
| Message-ID | <06df01c40dea$1f3ebc50$1100000a@mark> |
Remy writes:
> function smarty_prefilter_literal_style(&$tpl_source, &$smarty)
> {
> $pattern[] = '~<style\b(?![^>]*smarty)>(.*)</style>~siU';
> $replace[] = '<!--{literal}--><style$1>$2</style><!--{/literal}-->';
> return preg_replace($pattern, $replace, $tpl_source);
> } // function
Unless I'm missing something this won't handle:
<style>
.main {
color: {$colors.main}
}
</style>
.. which is what I'm trying to achieve? (Or similar example in JS; I think
the CSS example is simpler to understand.)
--
Mark Rogers,
More Solutions Ltd
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php