title: Array merging/manipulation with Velocity
body: <p>I have an array set inside a velocity template that contains some paths.<br/>
  The idea is to put a few "default" .js/.css files that 90% of the pages will use in this array.<br/>
  However, the other pages will still have to be able to add/delete values from this array, in case there are no linked files at all, or I need to add some.</p>
  
  <p>Given this code:</p>
  
  <pre><code>#set ( $head.scripts = [ "https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js" ] )
  
  #foreach ($URI in $head.scripts)
  &lt;script type="text/javascript" src="$URI"&gt;&lt;/script&gt;
  #end
  </code></pre>
  
  <p>Is there any way to add/delete values from these defaults?<br/>
  I have seen this <a href="https://velocity.apache.org/tools/1.4/javadoc/org/apache/velocity/tools/generic/ListTool.html" rel="nofollow noreferrer">list tool</a>, but it looks like it's not enough for what I need.</p>