how to create blocks ?|! |
[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 ?!
[eluser]Cristian Gilè[/eluser]
Hi Evollution, these tuts can help you: http://net.tutsplus.com/articles/news/co...atch-day-1 http://net.tutsplus.com/articles/news/co...atch-day-2 http://net.tutsplus.com/articles/news/co...atch-day-3 http://net.tutsplus.com/articles/news/co...atch-day-4 http://net.tutsplus.com/articles/news/co...atch-day-5 http://net.tutsplus.com/articles/news/co...atch-day-6 http://net.tutsplus.com/articles/news/co...atch-day-7 http://net.tutsplus.com/articles/news/co...atch-day-8
[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. |
Welcome Guest, Not a member yet? Register Sign In |