title: Smarty check if undefined
body: <p>i am getting errors if smarty variable is undefined.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt; input type="text" value="{$data.allKeywords} id='keyId' /&gt;
  </code></pre>
  
  <p>I am getting the error: Undefined index: allKeywords.</p>
  
  <p>I know the variable - $data.allKeywords is undefined but should it not ignore it if a variable is undefined? </p>
  
  <p>Is there a way to check if it is undefined in smarty template files only ?</p>
  
  <p>Thanks. </p>