title: How do I check if file exists in Smarty 2
body: <p>How do I check if file exists in Smarty 2? I mean something like this:</p>
  
  <pre><code>{assign var="module_js" value="/js/modules/{$module}.js"}
  {if file_exists($module_js)}
      &lt;script type="text/javascript" src="{$module_js}"&gt;&lt;/script&gt;
  {/if}
  </code></pre>