Welcome Guest, Not a member yet? Register   Sign In
Changing templates location folder
#1

[eluser]Gewa[/eluser]
I want to change the views folder location from ./system/application/views to the ./templates

can anybody be so kind to tell me where in config I should change the value, so that template class or $this->load->view will take views from ./templates folder in the root of the site????
Thanks
#2

[eluser]Jamie Rumbelow[/eluser]
You can set this value in your application's code (AFTER the loader has been initialised) by setting the $_ci_view_path variable on the Loader class:

Code:
$this->load->_ci_view_path = dirname(__FILE__) . '/templates';
#3

[eluser]Gewa[/eluser]
this will work on both?
Code:
$this->load->view('something')
and
$this->load->library('parser');



$this->parser->parse('blog_template')
#4

[eluser]CroNiX[/eluser]
No, just the view path.
#5

[eluser]Gewa[/eluser]
And what to do with parser?




Theme © iAndrew 2016 - Forum software by © MyBB