title: How do I check to see if a Smarty variable is already assigned?
body: <p>How do I check to see if a particular value has already been assigned to Smarty and if not assign a (default) value?</p>
  
  <p>Answer:</p>
  
  <pre><code>if ($this-&gt;cismarty-&gt;get_template_vars('test') === null) {
     $this-&gt;cismarty-&gt;assign('test', 'Default value');
  }
  </code></pre>