• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.