Welcome Guest, Not a member yet? Register   Sign In
[Q] another loading views from DB
#3

[eluser]vlad_ci[/eluser]
Thank you,

I understand that in viewes the CI substitues
'macro' variables in the view with the values generated in the model
or controller.

So in your example you are passing the values via the $data
array.


What I was asking is if I can do this



$my_string_I_just_created=my_db.get_view_mockup_from_db();
$this->load->view($my_string_I_just_created);

I may be missing it but I just did not see an example
where the CI view class can load the php file representing
the view -- not from a file residing in /viewes directory
but from a string.


There are a couple of reason why I am looking to do something
like this
one is that my users can specify the input fileds their names
and the overall look of the wizards -- and I store that in the database.

Second, what I would like to do is to somehow use the
code igniter to cache the pages (because they will not change
for each wizard).

... EDIT ...
or may be what you meant is that my view.php would just have
a one line something like

my_simple_view.php

<?php echo $my_view_data;?>

and then I would just do


$data['my_view_data'] =my_db.get_view_mockup_from_db();
$this->load->view('my_simple_view',$data);

?

thanks in advance,
vlad


Messages In This Thread
[Q] another loading views from DB - by El Forum - 07-16-2008, 04:51 AM
[Q] another loading views from DB - by El Forum - 07-16-2008, 08:30 AM
[Q] another loading views from DB - by El Forum - 07-18-2008, 06:26 PM
[Q] another loading views from DB - by El Forum - 07-19-2008, 10:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB