Welcome Guest, Not a member yet? Register   Sign In
Pagination URL
#1

[eluser]Unknown[/eluser]
Hi,

I've included the CodeIgniter Pagination class into my application and it is working just fine. However, the only issue I am having is with the format of the URL. Currently, the paginated URL is displayed as such:

http://localhost/webroot_folder/class_na...age_number

How would I go about displaying the paginated URL as:

http://localhost/webroot_folder/class_name/page_number (without the method name).

NOTE: The method name is 'index' (the default).

Thanks!
#2

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums!

When you set the base_url for the pagination library, just omit your method name. Smile

However, it won't work unless you use _remap() in your controller, or setup a route. CodeIgniter will assume the page number is a method name.
#3

[eluser]Unknown[/eluser]
Thank you! I setup a route to format the url. :-)




Theme © iAndrew 2016 - Forum software by © MyBB