title: How to get COOKIE in Smarty
body: <p>When User already login, i want to show some link in page</p>
  
  <pre><code>&lt;{if(!empty($_COOKIE['USER']))}&gt;
     &lt;a href="domain.com/page-a.html"&gt;TEXT A&lt;/a&gt;
  &lt;{else}&gt; &lt;a href="domain.com/page-b.html"&gt;TEXT B&lt;/a&gt;
  &lt;{/if}&gt;    
  </code></pre>
  
  <p>but does not work</p>
  
  <hr>
  
  <p>Found the answer myself, just replace :</p>
  
  <pre><code>&lt;{if(!empty($_COOKIE['USER']))}&gt;
  </code></pre>
  
  <p>with</p>
  
  <pre><code>&lt;{if $smarty.cookies.USER!=''}&gt;
  </code></pre>
  
  <p>Yihaaa !!!</p>