Answer the question
In order to leave comments, you need to log in
Phpstorm 7: HTML with inline JS - templating statements, can they be "legitimized"?
Hello.
I am learning phpstorm after eclipse pdt. Quite often, I embed a java script into templates if it is relevant only to this place, and use the template engine constructs to change the script according to the condition, for example like this:
<script>
var callback = function(){};
{if $type == 'edit'} // конструкция шаблонизатора
var resultobj = someEditFunc(blah, callback);
{else} // конструкция шаблонизатора
var resultobj = someCreateFunc(blah, callback);
{/if} // конструкция шаблонизатора
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question