Welcome Guest, Not a member yet? Register   Sign In
Add change view folder for VIew
#11

I wanted to change the theme for the user. The standard replacement in the controller method looks like a repeat. There is no other way to change the subject. To put it more simply, we need dynamic paths to templates
Code:
view($theme . '/user/dashboard');
Simple CI 4 project for beginners codeigniter-expenses ( topic )
Reply
#12

Sorry, I don't get what you say.
What is the standard replacement in the controller method?

Also, if view($theme . '/user/dashboard') works, it seems fine to me.
It is clear that you are using the theme's view file.
You don't need to change the path in the View instance.
Reply
#13

That's what I want to change. I think the variable in the name is superfluous. This means that it is preferable to change this value somewhere in one place.
Simple CI 4 project for beginners codeigniter-expenses ( topic )
Reply
#14

I am sorry, but I do not see why the path should be changed during a request.

It is easy to add a setter if you extend the View class. 
I don't see why the setter should be provided to all CodeIgniter users.

The setter only complicates the View class and don't seem to have benefit.
Reply
#15

Fine. then let's not waste time on this. I have nothing to add except what I have said.
Simple CI 4 project for beginners codeigniter-expenses ( topic )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB