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

[eluser]Perkin5[/eluser]
I've been playing around with a template tutorial, one of the key steps in which is to grab the contents of a view and make it equal to a variable.

So say I have a view called contact_us.php.

Then in the controller I have a function to load the template including this:

Code:
&data;['content'] = 'contact_us';

To my amazement this works and the contents of contact_us.php view is loaded into $content.

My question is, how does Codeigniter know that I want to load the contents of that file and not the text contact_us ?


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