|
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 |
jaja301000 Smarty n00b
Joined: 17 Jul 2012 Posts: 1
|
Posted: Tue Jul 17, 2012 6:38 am Post subject: Javascript mit folgen den klammern {% } |
|
|
Hallo,
habe ein kleine Frage habe ein Javascript mit folgen den klammern.
{% } %}
<td class="cancel">{% if (!i) { %}
<button class="btn btn-warning">
<i class="icon-ban-circle icon-white"></i>
<span>{%=locale.fileupload.cancel%}</span>
</button>
{% } %}</td>
</tr>
{% } %}
bei einfügen in eine eigene .tpl erhalte ich ein smarty tag fehler.
Was kann ich machen. |
|
Back to top |
|
Grizzly Smarty Pro
Joined: 15 Apr 2011 Posts: 172 Location: Germany
|
Posted: Tue Jul 17, 2012 6:49 am Post subject: |
|
|
Das leigt daran, dass du "smarty-Klammern" verwendest, und smarty will diese dann als eigene Tags ansehen und versucht diese zu bearbeiten, daher der Fehler. Beheben kannst du das ganze, indem du den Literal-Smarty-Tag nimmst:
Code: |
{literal}
{% if (!i) { %}
{/literal}
|
|
|
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
|