title: How to call multiple models on one page (Codeigniter equiv of Cake Elements)
body: <p>I'm just getting familiar with Codeigniter (2.1.0) and building a simple site, that has a table for products and a table for locations. I have followed the CI documentation and successfully built a page to display data from each table. But my goal is to show both sets of data on the home page. CakePHP handles this nicely with "elements", where the data from an unrelated controller can be shown on a page handled by a different controller. Seems simple and I'm having a tough time finding a starting point. </p>
  
  <p>Here is the index function from the products controller:</p>
  
  <pre><code>public function index()
  {
  $data['product'] = $this-&gt;product_model-&gt;get_product();
  $data['title'] = 'title of page';
  
  $this-&gt;load-&gt;view('templates/header', $data);
  $this-&gt;load-&gt;view('product/index', $data);
  $this-&gt;load-&gt;view('templates/footer');
  }
  </code></pre>
  
  <p>I gave a shot to include the locations model by creating a function that called that model also in the products controller, and then included the function in the above with $this->functionName();
  That did not work. Any advice on where to begin?</p>