Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

comment contain several {literal} does not work in {literal}

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
guanhuan
Smarty n00b


Joined: 27 Jun 2014
Posts: 2

PostPosted: Fri Jun 27, 2014 3:10 pm    Post subject: comment contain several {literal} does not work in {literal} Reply with quote

I am using the syntax in CiviCRM 4.4.

Code:
if({/literal}{$calls->getContact(2)}{literal}==1){
            cj("[id='a']").val('{/literal}{$calls->_a}{literal}');
            cj('#b').html("Successful.");
 
            cj("[id='c']").val('{/literal}{$calls->_c}{literal}');
            cj("[id='d']").val('{/literal}{$calls->_d}{literal}');
            cj("[id='e']").val('{/literal}{$calls->_e}{literal}');
           .
           .
           .
            );
 
            cj.each(fields, function(key, value){
             .
             .
             .
            });
 
            cj(...);
           
          }else{
           .
           .
           .
       }


This piece of code is inside:
{literal}
<script type="text/javascript">
</script>
{/literal}

When I comment it out using /* */ or {* *}.
it does not work.


Last edited by guanhuan on Wed Jul 09, 2014 4:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Fri Jun 27, 2014 10:40 pm    Post subject: Reply with quote

{literal} does by definition turn of the interpretation of all Smarty tags including the {* the *} comment tags.

So within {literal}{/literal} you can't comment {literal} tags out.
Back to top
View user's profile Send private message
guanhuan
Smarty n00b


Joined: 27 Jun 2014
Posts: 2

PostPosted: Wed Jul 09, 2014 4:07 pm    Post subject: Reply with quote

U.Tews wrote:
{literal} does by definition turn of the interpretation of all Smarty tags including the {* the *} comment tags.

So within {literal}{/literal} you can't comment {literal} tags out.


Thanks! That solved my problem.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP