Re: Re: literal and javascript

pete M <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
I think some have missed my point.
The idea is to use backticks as delimiters within javascript code 
enclosed between {literal} tags

eg------

{literal}
function foo{
     bar = `$some_smarty_variable` + 1;
     if(bar > 0) {
        bar2 = bar * `$some_other_smarty_variable`;
     }
{
{/literal}

instead of -----


{literal}
function foo{
     bar = {/literal}$some_smarty_variable{literal} + 1;
    if(bar > 0) {
         bar2 = bar * {/literal}$some_other_smarty_variable{literal};
    }
{

{/literal}

just an idea to make the coding easier to code and read

pete



Messju Mohr wrote:
> On Tue, Mar 16, 2004 at 06:37:00PM +0300, Konstantin A. Pelepelin wrote:
> 
>>>could smarty somehow have variables within the {literal} tags eg in 
>>>Backticks or some "non used" javascript code ?
>>
>>Please don't!
> 
> 
> Yes, please don't!
> 
> Literal should do what it's name says: pass the contents through
> *literally*.
>  
> 
>>JavaScript is the reason why I use alternate Smarty delimiters {{ }}. 
>>Unfortunately, people used to use default { }.
>>
>>Konstantin A. Pelepelin
>>DTF.RU

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.