Welcome Guest, Not a member yet? Register   Sign In
how to change the view file extension.
#1

[eluser]loca[/eluser]
Hi, I want to change the rule of naming view file in View folder. By default, codeigniter use: name.php and in controller, we use $this->load->view('name');. Now O want to change the name of view file to name.view.php, but we still use $this->load->view('name'); in our controller. How do i change this.
Thanks!
#2

[eluser]InsiteFX[/eluser]
$this->load->view(‘name.view’);
#3

[eluser]loca[/eluser]
If I view file is named "name.view.php" and then we use $this->load->view(‘name.view’);
---------------------------------------------------
An Error Was Encountered
Unable to load the requested file: bestsellers.view
---------------------------------------------------
for it run correctly, we must use $this->load->view(‘name.view.php’);

But I wantto use $this->load->view(‘name’);
#4

[eluser]InsiteFX[/eluser]
Code:
$name = 'view_name';
$this->load->view($name);

InsiteFX
#5

[eluser]loca[/eluser]
It doesn't work!
#6

[eluser]toopay[/eluser]
[quote author="Nguyen Quoc Bao" date="1303979007"]If I view file is named "name.view.php" and then we use $this->load->view(‘name.view’);
---------------------------------------------------
An Error Was Encountered
Unable to load the requested file: bestsellers.view
---------------------------------------------------
for it run correctly, we must use $this->load->view(‘name.view.php’);

But I wantto use $this->load->view(‘name’);[/quote]

Thats doesn't make any sense! Are you aware, in the world we live, '.'(dot) at filenames means extension! Are you try to change that universal convention, for some trivial reason? I really don't get it!




Theme © iAndrew 2016 - Forum software by © MyBB