Welcome Guest, Not a member yet? Register   Sign In
View inside a view?
#1

[eluser]skunkbad[/eluser]
I've got two areas in my template (which is a view), that are filled in with smaller snippets of html (which are also views), but the output of the page has the snippets above the template code.

This is my first attempt at CodeIgniter, and I'm converting my home page over from Kohana, which easily allows views to be inside views. Perhaps I'm not doing it right, but is this possible with CodeIgniter?

Code:
$pageStyle = 'some_data_string';
$colB = array ( $pageStyle );
$data = array(
    'colA' => $this->load->view('home/colA_content' ),
    'colB' => $this->load->view('home/colB_content', $colB ),
);
$this->load->view('template_content', $data );

Output should be colA and colB inside the template, but right now the output is:

colA
colB
template


Messages In This Thread
View inside a view? - by El Forum - 05-17-2009, 02:14 AM
View inside a view? - by El Forum - 05-17-2009, 02:20 AM
View inside a view? - by El Forum - 05-17-2009, 02:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB