title: Extend template for js inclusion
body: <p>i have a web project. The project is based on Smarty templates.
  I have a base.tpl with the common structure, for all pages of my site.</p>
  
  <p>The base.tpl have the next line, thats includes the template requested by the user:</p>
  
  <pre><code>{include file="{$request}"}
  </code></pre>
  
  <p>For example. When the user request <code>http://mydomain/contact</code>, $request have "contact.tpl" value.</p>
  
  <p>And the bottom of base template have the inclusion of the commons js files:</p>
  
  <pre><code>{block name="javascript"}
      &lt;script src="{$BASE_URL}/assets/js/libs/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
      &lt;script src="{$BASE_URL}/assets/bootstrap/js/bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script src="{$BASE_URL}/assets/js/common.js"&gt;&lt;/script&gt;
  {/block}
  </code></pre>
  
  <p>So, any templates requested by the user, requires the inclusion of mores javascript files, that i like insert in the "javascript" block.</p>
  
  <p>I try, for example in the contact.tpl the next code:</p>
  
  <pre><code>{block name="javascript" prepend}
      &lt;script src="{$BASE_URL}/assets/js/libs/validation/jquery.validate.js"&gt;&lt;/script&gt;
      &lt;script src="{$BASE_URL}/assets/js/libs/validation/localization/messages_es.js"&gt;&lt;/script&gt;
      &lt;script src="{$BASE_URL}/assets/js/contact.js"&gt;&lt;/script&gt;
  {/block}
  </code></pre>
  
  <p>But, the files not load in the browser. Any ideas ?.</p>