Display the view in a specified <div> |
[eluser]Filip_vh[/eluser]
Hello, As the topic says, I'm wondering wether it would be possible to have a general lay out where I can specify everything on my site that doesn't change over all pages (such as the menu). This way I wouldn't have to paste the entire code there (see below). Code: <html> If I could just have it put inside the correct div. My views would be a lot easier to manage and maintain. I'm sorry of this is a silly question but the video tutorials don't mention any of this (AFAIK) and I couldn't immediately find something like it in the user guide (though I have to admit I didn't completely search them. Just a first glance but nothing seemed to fit what I was looking for ... 8-/ ). I hope somebody can give me a push in the right direction. Cheers Filip
[eluser]fesweb[/eluser]
I just came to a solution for this yesterday, and posted it in this thread. I think that's what you're looking for.
[eluser]Sarfaraz Momin[/eluser]
You can achieve it by doing something like this. controller Code: $data['divcontent'] = $this->load->view('divcontent','',true) view Code: <html> Hope this helps. Have a good day !!! |
Welcome Guest, Not a member yet? Register Sign In |