Controllers in sub-folder |
[eluser]Nikhil Vijayan[/eluser]
I am now creating a website with member side and admin side using ci. I created a folder called admin in the controllers folder. Then created a controller named members inside the admin folder to view/edit/delete members. The default index function is working when i access Quote:http://site/admin/members but when i call the member function view Quote:http://site/admin/members/view i am getting a 404 Page not Found error. Anybody please help to solve this problem. Quote:I Corrected it. The View function was renamed to View2 . This made it work properly
[eluser]Nikhil Vijayan[/eluser]
Another Problem My css file is placed in the root as css/main.css all the pages link to it using css/main.css but the views in admin folder doesn't show css style .. ANY idea ? How can i correct it
[eluser]NemetraL[/eluser]
As much as possible (meaning for all that kind of links), try the abolute paths using Code: <?php echo site_url(); ?>path/to/css/file Remember to auto include the url helper first in the application/config/autoload.php file, otherwise you won't have access to Code: site_url();
[eluser]Nikhil Vijayan[/eluser]
Thanks Nemetral. Your idea works. I temporarily solved the problem by placing css file inside view folder and using Code: <style> changing to site_url() method.
[eluser]tinawina[/eluser]
Hi - not sure if this will help you (it did me). Check out this thread re: modular separation: http://ellislab.com/forums/viewthread/46669/ The code you need is available through the CI wiki - search on modular separation.
[eluser]esra[/eluser]
I use the same method suggested by NemetraL, but there is also a forum post about an assets_helper that allows you to define the paths to your css, image, and javascript files. |
Welcome Guest, Not a member yet? Register Sign In |