|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
guanhuan Smarty n00b
Joined: 27 Jun 2014 Posts: 2
|
Posted: Fri Jun 27, 2014 3:10 pm Post subject: comment contain several {literal} does not work in {literal} |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Jun 27, 2014 10:40 pm Post subject: |
|
|
{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 |
|
guanhuan Smarty n00b
Joined: 27 Jun 2014 Posts: 2
|
Posted: Wed Jul 09, 2014 4:07 pm Post subject: |
|
|
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 |
|
|
|
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
|