• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pagination Detection

#2
[eluser]davidbehler[/eluser]
Let's say your url looks like this: "http://www.example.com/mycontroller/myfunction/3" where "3" is supposed to be the page.

Then your controller would look like this:
Code:
class Mycontroller extends Controller
{
    function Mycontroller
    {
        parent::controller();
    }

    function myfunction ($page = 1)
    {
        echo $page;
    }
}
and the output would be "3".

If you go to "http://www.example.com/mycontroller/myfunction" (notice the missing page parameter), the output would be "1".

There is no need to look for a pagination object (whatever that would be). Maybe you are trying to find out if the pagination library is loaded?


Messages In This Thread
Pagination Detection - by El Forum - 12-31-2009, 09:45 AM
Pagination Detection - by El Forum - 12-31-2009, 09:54 AM
Pagination Detection - by El Forum - 12-31-2009, 10:32 AM
Pagination Detection - by El Forum - 12-31-2009, 04:10 PM
Pagination Detection - by El Forum - 12-31-2009, 04:30 PM
Pagination Detection - by El Forum - 01-01-2010, 09:19 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.