Welcome Guest, Not a member yet? Register   Sign In
Block access to models from loaded views
#3

[eluser]Brad Martin[/eluser]
Thanks for your reply but my question is a little different then that sorry i didn't explain better.

In the views folder there will be a site folder e.g. ./application/views/site/ In that folder a site template will be place by third parties or by the user of the software to put their own website.

Then the controller I've setup will load the view files from that directory for example if a user requested the url http://example.com/users then the controller would load the view.

Code:
$this->load->view('site/users.php');

The users.php file would then have access to all of code igniters features including the ability to run model functions.

For example the user.php file could have this:

Code:
$this->load->model('m_users');
print_r($this->m_users->listUsers());

And would have access to the data.

I could load the files external to codeigniter which would fix this but then they would not have any access to the other codeigniter features.

My goal is to be able to just block out the model functions for any view files that are loaded from the ./application/views/site/ directory


Messages In This Thread
Block access to models from loaded views - by El Forum - 06-08-2012, 08:36 PM
Block access to models from loaded views - by El Forum - 06-08-2012, 09:46 PM
Block access to models from loaded views - by El Forum - 06-08-2012, 11:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB