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

[eluser]kv[/eluser]
hello friends.
i am using codeigniter pagination class.its working fine .
can you guide me how to add another parameter in pagination link.
like i want to add more parameter i.e id in link.
#2

[eluser]sikkle[/eluser]
give an example of what you try to do.

thanks.
#3

[eluser]kv[/eluser]
Ok i give you an example:

Page link:First>1234<last

$config['base_url'] = $this->admin_url.'/therapist_visitor/index/';

i just want when i have to click on first>123 any link one more parameter i.e id=1 also passed.bcz i have request id from last page.
#4

[eluser]Grahack[/eluser]
I guess that many people here want to help you, but you're not very clear.
If I guess correctly what you want, you may pass some parameters even after a pagination url, and catch them back with
Code:
$this->uri->segment(n)
See the docs.
#5

[eluser]blackdogfnq[/eluser]
Does anyone know if it is possible to paginate in alphabetical list?

My CI site has a large image lib which is sorted by Alphabetical order in a effort to group images. My problem is that it is incredibly annoying trying to find a specific image if you know the name but have to search through the pagination by number.

cheers
BD
#6

[eluser]xwero[/eluser]
@blackdogfnq : i think you better create your own pagination because the CI pagination is not build for that purpose.
In your model you could have these methods
Code:
// returns object with the present first letters
function get_links()
{  
    return $this->db->query('select distinct substring(filename,1,1) as first from table order by substring(filename,1,1)');
}
// returns files with a first letter
function get_files_by_first_letter($letter)
{
   return $this->db->query('select filename from table where filename like "'.$letter.'%"');
}
Pagination of this type is easier because you have a limited range.
#7

[eluser]blackdogfnq[/eluser]
thanks Xwero

I figured as much. cheers for the heads up on the methods.




Theme © iAndrew 2016 - Forum software by © MyBB