title: creating a master template in CodeIgniter
body: <p>I am stuck with a very basic problem. Ook the problem is this that I want a master template in which I can call the header, body and footer. I am unable to send title and css in header and also how can I send multiple css files. I am doing something like this:</p>
  <p><strong>This is the code in controller</strong></p>
  <pre><code>$data['title'] = 'Login To WePOS';
  $data['css']   = base_url().'style/login-box.css';
  
  $this-&gt;load-&gt;view('templates/default',$data);   
  </code></pre>
  <p><strong>This is the code in header</strong></p>
  <pre><code>&lt;head&gt;
  &lt;title&gt;&lt;?php echo $title ?&gt; - CodeIgniter 2 Tutorial&lt;/title&gt;
      &lt;link href=&quot; &lt;?php echo $css;?&gt;&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
  &lt;/head&gt;
  </code></pre>
  <p><strong>This is the code in template name as default</strong></p>
  <pre><code>&lt;html&gt;
  &lt;?php 
  $this-&gt;load-&gt;view('templates/header', $data);
  ?&gt;
  &lt;body&gt;
  
  &lt;?php 
       $this-&gt;load-&gt;view('login/index', $data);
  ?&gt;
  &lt;/body&gt;
  &lt;?php 
       $this-&gt;load-&gt;view('templates/footer', $data);
   ?&gt;
  &lt;/html&gt;
  </code></pre>