Skip to content

Instantly share code, notes, and snippets.

@phawk
Created January 14, 2012 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phawk/1611194 to your computer and use it in GitHub Desktop.
Save phawk/1611194 to your computer and use it in GitHub Desktop.
<?php
class Home extends MY_Controller {
public function index()
{
// Automatically the system will render this view: ./application/views/home/index.php
}
public function page_two()
{
// Set the view path manually for this method.
$this-&gt;view_path = &#39;pages/page_two.php&#39;;
}
public function __destruct()
{
// Render the template on destruct
$this-&gt;render();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment