Reputation: 491
I went through a blog; http://philsturgeon.co.uk/blog/2009/07/Create-an-Admin-panel-with-CodeIgniter
I have already built the frontend of the whole site and now the client wants few features to be added in an admin section. I followed the 1st method but it didn't work for me except the very first page (i.e. set in routes.php as $route['default_controller'] = "main";
).
The URL looks like "http://localhost/myproject/admin/dashboard"
, yes it leads to a 404 page
.
I have fully followed the way you have described above (folder structure and setting 2 index files). Am i missing anything? Or it just doesn't work at all in my case?
Upvotes: 0
Views: 14158
Reputation: 4549
i am also following the same blog there. "You'll need to set a $route['admin'] = 'admin/dashboard'; to get example.com/admin worksing but thats easy enough." doing above, when i point to admin it shows the dashboard view.
Upvotes: 0
Reputation: 36970
This would help you
http://codeigniter.com/wiki/Modular_Extensions_-_HMVC
Wonderful package helps you to integrate CI in modular structure .I've used this for one project. Great it will consider admin as a module ,also you can create blog,forum modules etc
Upvotes: 0
Reputation: 1814
is your site so big that you need this ? because if you dont know codeigniter, this adds a level of complexity thats not needed, also note that the howto is from 2009 and definately not using the latest codeigniter 2
I would rethink exactly what you need
if you have nothing working now, here is another howto link http://andreytech.com/creating-crud-admin-panel-in-codeigniter/
Upvotes: 1