Welcome Guest, Not a member yet? Register   Sign In
Coding approach question: how to (easily) build a navigation.
#5

[eluser]Bramme[/eluser]
I've created a simple model which I set to autoload:
Code:
class Pagemodel extends Model {
    var $data = null;
    
    function showViews($display = 'home', $data = null) {
        $this->data['pages'] = array('...........');
        $this->load->view('header', $this->data);
        $this->load->view($display, $this->data);
        $this->load->view('footer');
    }
}

What would be the difference if I used a library? Or what's wrong about using a model, other than it's supposed to interact with my database? I might as well use it as a means to send e-mail, no?


Messages In This Thread
Coding approach question: how to (easily) build a navigation. - by El Forum - 05-30-2008, 03:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB