Welcome Guest, Not a member yet? Register   Sign In
Templates
#9

[eluser]Perkin5[/eluser]
Sorry about this but I've come out of my dark place and I realise you still haven't answered my original question.

We don't have a situation of $this->load->view($content) as in your post. We have a situation of $this->load->view('template', $data) where $data contains a key value pair of 'content'=>'contact_us'.

When a view is loaded, CI turns the data array keys into variables that can then be used in the view. If I wanted to pass in the text 'page_title' I would do $data['title'] = 'page_title'. Then in the view I would echo $page_title and get back my text.

However in this case, CI interprets the words 'contact_us' as the contents of a file with that filename. I still don't get it.


Messages In This Thread
Templates - by El Forum - 07-12-2011, 11:53 AM
Templates - by El Forum - 07-12-2011, 08:02 PM
Templates - by El Forum - 07-12-2011, 08:42 PM
Templates - by El Forum - 07-13-2011, 02:18 AM
Templates - by El Forum - 07-13-2011, 02:53 AM
Templates - by El Forum - 07-13-2011, 04:36 AM
Templates - by El Forum - 07-13-2011, 04:42 AM
Templates - by El Forum - 07-13-2011, 05:02 AM
Templates - by El Forum - 07-13-2011, 02:48 PM
Templates - by El Forum - 07-13-2011, 03:01 PM
Templates - by El Forum - 07-13-2011, 03:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB