blank page when i try to get $this->load->view into a var with third param on true [SOLVED] |
[eluser]meigallodixital[/eluser]
i'm trying to save a view into a var with this code: Code: $data['news'] = $this->db->get('news')->result(); news view is a foreach loop with echos. But this code gives a blank page. If i omit $data: Code: $this->load->view('news','',TRUE) works, anyone knowns why? Thanks in advance. Sorry, my english is very bad
[eluser]John_Betong[/eluser]
I reckon the problem could be on any one of your lines of code so suggest inserting this code. It will show where the data is not appearing: Code: function _show($data) { // '_' prefix to denote private function to this class
[eluser]meigallodixital[/eluser]
returns the same blank page, if i do: Code: $data['news'] = $this->db->get('news')->result(); works perfectly. The problem seems $data+true param
[eluser]meigallodixital[/eluser]
my fault, i have an error in pagination code, sorry
[eluser]John_Betong[/eluser]
[quote author="meigallodixital" date="1226417492"]returns the same blank page, if i do: Code: $data['news'] = $this->db->get('news')->result(); works perfectly. The problem seems $data+true param[/quote] If you are trying to use the TRUE parameter to save the contents of a partial view then you must assign the partial view to a variable: Code: $data['news'] = $this->db->get('news')->result(); Have you read and understood Views |
Welcome Guest, Not a member yet? Register Sign In |