title: Swig template, testing condition
body: <p>how can i do something like this with swig-template?</p>
  
  <pre><code>var remId = $(this).attr('remId');
  if (remId) {
      var end = remId.search('_');
      var underscore = remId.slice(end, end + 1); 
      var Id = remId.slice(end + 1, remId.length);
  }
  </code></pre>
  
  <p>for example, if remId = 123455_instock_white
  i need to find out if remId has instock or prestock. </p>
  
  <p>so if Id contains instock, Id will go under instock table
  and if Id contains prestock, Id will go under prestock table.</p>
  
  <p>any idea? how shold i filter this?</p>