title: if statement with parser class on view codeigniter
body: <p>I'm working with <code>codeigniter</code>  and I'm  wondering if I can use <code>if statement</code> on a view  like twig ( without <code>twig</code>) using the <a href="https://ellislab.com/codeigniter/user-guide/libraries/parser.html" rel="nofollow">parser class</a> or what is the best approach to do it?</p>
  
  <p>In the controller</p>
  
  
  
  <pre><code> public function peajes()
   {
      $data = array(
          'booleanVariable' =&gt; true,
       );
      $this-&gt;parser-&gt;parse('myView', $data);
   }
  </code></pre>
  
  <p>In the view </p>
  
  <pre class="lang-xhtml prettyprint-override"><code>{%if booleanVariable %}
      &lt;div&gt;
          ...
      &lt;/div&gt;
  {endif}
  </code></pre>