Welcome Guest, Not a member yet? Register   Sign In
Application Constants (header, footer)
#6

[eluser]Michael Wales[/eluser]
I like to just do something simple like this:

controllers/posts.php
Code:
function index() {
    $this->data->partial = 'posts/list';
    $this->load->view('layout', $this->data);
  }
}

views/layout.php
Code:
$this->load->view('_header');
$this->load->view($partial);
$this->load->view('_footer');

If my headers/footers/sidebars etc. are going to contain dynamically generated content, I usually use Zacharias' awesome Wick library.


Messages In This Thread
Application Constants (header, footer) - by El Forum - 12-02-2008, 11:23 AM
Application Constants (header, footer) - by El Forum - 12-02-2008, 11:51 AM
Application Constants (header, footer) - by El Forum - 12-02-2008, 12:49 PM
Application Constants (header, footer) - by El Forum - 12-02-2008, 01:29 PM
Application Constants (header, footer) - by El Forum - 12-02-2008, 01:31 PM
Application Constants (header, footer) - by El Forum - 12-02-2008, 02:10 PM
Application Constants (header, footer) - by El Forum - 12-02-2008, 03:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB