Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is this script tag?

I've never seen it used like this before:

<script src="{{ file.name_js }}"></script>

Is this better?

like image 557
ultraloveninja Avatar asked Jul 15 '12 17:07

ultraloveninja


2 Answers

This is something from a templating engine, such as Smarty or similar.

Everything between the brackets {{ }} is handled server-side, likely so that the script files can be minified server-side easily and the file name be updated to the minified version, or something from a variable.

like image 163
Brad Avatar answered Oct 14 '22 23:10

Brad


looks like somekind of a templating language Django has the same kind of tags for example.

like image 36
Uku Loskit Avatar answered Oct 14 '22 21:10

Uku Loskit