CodeIgniter Forums
HMVC + Admin pagination (SOLVED) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: HMVC + Admin pagination (SOLVED) (/thread-35755.html)



HMVC + Admin pagination (SOLVED) - El Forum - 11-10-2010

[eluser]eokorie[/eluser]
Hi,

I hope someone can help me figure this out... I am currently using HMVC in my application and I applied Phil's Sturgeon 3rd method of setting up an admin panel instead of my usual 2 applications. I can get the pagination to work well on the front end of my application but I am having major issues with getting it to work with the backend.

I have tried everything I could think with the routes, but cant seem to get pagination to work on my admin items. Can anyone help?

This is the default routing for admin in the global config folder:

Code:
$route['admin/([a-zA-Z_-]+)/(:any)'] = '$1/admin_$1/$2';
$route['admin/([a-zA-Z_-]+)'] = '$1/admin_$1/index';
$route['admin/(:any)']        = 'admin/$1';
$route['admin']               = 'admin';

The modules do have their own routes.php file but I cant seem to get the pagination working. Any help will be appreciated.

Thanks


HMVC + Admin pagination (SOLVED) - El Forum - 11-12-2010

[eluser]eokorie[/eluser]
Found the solution to my problem...


HMVC + Admin pagination (SOLVED) - El Forum - 12-26-2010

[eluser]kamal lamichhane[/eluser]
would you please share. i have the same problem too.


HMVC + Admin pagination (SOLVED) - El Forum - 12-26-2010

[eluser]eokorie[/eluser]
When setting you your admin pagination, simply make sure you include "index" in your urls.
For example, set your pagination base_url to:

Code:
$config['base_url'] = base_url() . 'admin/module/index';