Welcome Guest, Not a member yet? Register   Sign In
how to create blocks ?|!
#1

[eluser]Evollution[/eluser]
for example i wanna create some blocks (Top 10 posters, last 10 regitred) .. where should i create them ?! and how to inlcude in a view file with CI ?!
#3

[eluser]Nick_MyShuitings[/eluser]
If you are using a layout View file which recieves other views as the $data (prior views called with third parameter TRUE) then this should be a cake walk.

Make the view file you want as a block, load it into a a variable:

Code:
$this->data['block1'] = $this->load->view('example',$this->data, TRUE):

And then when you call your final layout view its an available variable for echo.

(Or you could use My_Controller provided by Jamie Rumbelow which has layouting and asides (blocks) as part of the toolkit.




Theme © iAndrew 2016 - Forum software by © MyBB