Welcome Guest, Not a member yet? Register   Sign In
Views in subfolders
#1

[eluser]hal10001[/eluser]
I know that only one folder level for controllers is supported, but is this the same for views as well? Can I do this?

Code:
$this->load->view( 'folder/sub_folder/sub_folder/file' );
#2

[eluser]Colin Williams[/eluser]
Sure can. Would've saved you a bit of time to just attempt it ;-)
#3

[eluser]hal10001[/eluser]
Sorry about that. I guess I didn't think it was supported because I can't get this working:

http://ellislab.com/forums/viewthread/104933/

If I have a controller in the main controller directory I can call a view in any level of subfolders, however, the minute I moved my controller into a subfolder as well, then I couldn't get it to work anymore.
#4

[eluser]Colin Williams[/eluser]
Hrm.. that's odd. I cannot replicate. What exactly happens? What error messages do you receive.
#5

[eluser]TheFuzzy0ne[/eluser]
I have had the same problem so I'm assuming that we can only group controllers into sub directories one level deep into the controller directory.

Code:
controllers
     +-----admin
             +-- some_controller.php
             +-- subdir
                   +-- another_controller.php

http://mydomain.com/admin/some_controller - works!
http://mydomain.com/admin/subdir/another_controller - fails! (404 error)
#6

[eluser]TheFuzzy0ne[/eluser]
EDIT: Fudge, I misread the question. Please ignore above post and this post.
#7

[eluser]jane0109[/eluser]
Now I got it since I got this error. Thanks for the replies.




Theme © iAndrew 2016 - Forum software by © MyBB