Welcome Guest, Not a member yet? Register   Sign In
Rails-like inline partials? [solved]
#1

[eluser]Lorin Tackett[/eluser]
I've gotten really used to the rails way of including partials. Is there a similar way to do this with CI?

Code:
render :partial => 'path/to/partial'

I've got something like this in my controller

Code:
$this->load->view('layouts/application_header');
$this->load->view('index', $var_to_be_passed_to_form);
$this->load->view('layouts/application_footer');

That's fine and good, but inside the index view I'd like to add a partial for a form, which accepts variables passed from the controller. So inside the view is there a CI way to include that partial? I hesitate to use something like:

Code:
include = "path/to/partial.php";

Thanks;


Messages In This Thread
Rails-like inline partials? [solved] - by El Forum - 03-20-2008, 06:01 AM
Rails-like inline partials? [solved] - by El Forum - 03-20-2008, 06:18 AM
Rails-like inline partials? [solved] - by El Forum - 03-20-2008, 06:22 AM
Rails-like inline partials? [solved] - by El Forum - 03-20-2008, 06:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB