title: Passing smarty Variables in a include ( with Codeigniter )
body: <p>I'm very newbie to php and codeigniter (and smarty too).</p>
  
  <p>I follow a lot of tutorials and Now I'm confident with my smarty + CodeIgniter configuration, but now I have this escenario. I want to pass a couple of variables into a smarty include in order to show just two strings in the include ( the header, the strings are part of the title )</p>
  
  <p>This is the include (header.tpl):</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;{$Titulo} - {$NombreModulo} - Some Static text.com&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css" media="screen" href="/sitio/contenido/css/Style.css" /&gt;
  {literal}
  &lt;script type="text/javascript" src="/sitio/contenido/js/jquery-1.4.2.min.js" &gt;&lt;/script&gt;
  &lt;script type="text/javascript" charset="utf-8"&gt;
  {/literal}
  (some code omitted)
  </code></pre>
  
  <p>and my controller:</p>
  
  <pre><code>function index()
  {
      //$this-&gt;load-&gt;view('welcome_message');
      $this-&gt;load-&gt;library('smarty_parser');
      $datos = array (
      'texto' =&gt; 'String de prueba',
      'elapsed_time',1500,
      'TituloPagina','Inicio',
      'Modulo','Dashboard'
      );
      $this-&gt;smarty_parser-&gt;parse('plantilla.tpl', $datos);
  }
  </code></pre>
  
  <p>and the file Plantilla.tpl (the template)</p>
  
  <pre><code>{include file="head.tpl" Titulo=$TituloPagina NombreModulo=$Modulo }
  &lt;div id="cuerpo"&gt;
  {include file="sidebars/dashboard.tpl"}
  &lt;/div&gt;
  &lt;div id="contenido"&gt; {$texto} &lt;/div&gt;
  &lt;!-- fin del contenido --&gt;
  
  &lt;/div&gt;
  &lt;div id="footer"&gt; &lt;/div&gt;
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>The problem here is the first line on the last file (or a least I think so). I can put a static string here (<code>{include file="head.tpl" Titulo="Static Title" NombreModulo="Another one"}</code> ) and it works, but doesn't work with the way the documentation says.</p>
  
  <p>Clarifying, what I want to accomplish is to send some string variables to the smarty include to be printed on the tittle tags, from the controller.</p>
  
  <p><strong>UPDATE</strong> The code, when is set up like this, just display - - Some Static text.com</p>