Welcome Guest, Not a member yet? Register   Sign In
pagination part2 (help)
#21

[eluser]n0xie[/eluser]
[quote author="sasori" date="1264003192"]didn't work at all
Code:
$config['base_url'] = 'http://myapp/welcome/';
$config['uri_segment'] = 2;
[/quote]
What didn't work. I don't have a crystal ball...

What is the url generated by
Code:
$this->pagination->create_links();

What happens when you go to
Code:
http://myapp/welcome/6

Do you have enough records in your database to do paginating?
#22

[eluser]John Pantoja[/eluser]
Yup makes sense, doesn't he need some mod_rewriting? Wouldn't his uri actually believe http://myapp/index.php?/welcome/number ? Or is it time for me to go to bed and STFU lol
#23

[eluser]John Pantoja[/eluser]
[quote author="sasori" date="1264003192"]didn't work at all
Code:
$config['base_url'] = 'http://myapp/welcome/';
$config['uri_segment'] = 2;
[code][/quote]

getting back to your routes.php , are you doing all of this with the [code]$route['default_controller'];

I'm gonna sneak a peak at the docs...
#24

[eluser]sasori[/eluser]
[quote author="n0xie" date="1264003558"][quote author="sasori" date="1264003192"]didn't work at all
Code:
$config['base_url'] = 'http://myapp/welcome/';
$config['uri_segment'] = 2;
[/quote]
What didn't work. I don't have a crystal ball...

What is the url generated by
Code:
$this->pagination->create_links();

What happens when you go to
Code:
http://myapp/welcome/6

Do you have enough records in your database to do paginating?[/quote]

I do have enough data
here's a live version that doesn't have pagination just so that you can see
my data
http://zallastest.zzl.org
and here's the screenshot of my localhost
http://i49.tinypic.com/2cqcjcx.jpg
#25

[eluser]n0xie[/eluser]
[quote author="n0xie" date="1264003558"]
What is the url generated by
Code:
$this->pagination->create_links();

What happens when you go to
Code:
http://myapp/welcome/6
[/quote]
#26

[eluser]sasori[/eluser]
[quote author="n0xie" date="1264004291"][quote author="n0xie" date="1264003558"]
What is the url generated by
Code:
$this->pagination->create_links();

What happens when you go to
Code:
http://myapp/welcome/6
[/quote]

Sir I dunno what does $this->pagination->create_links() produces, according to the manual
i should just echo it on the view and i did.

but when I type manually the http://myapp/welcome/6
am getting a 404 page not found error
#27

[eluser]John Pantoja[/eluser]
[quote author="sasori" date="1264004516"]
Sir I dunno what does $this->pagination->create_links() produces, according to the manual
i should just echo it on the view and i did.

but when I type manually the http://myapp/welcome/6
am getting a 404 page not found error[/quote]

I can tell you're pinoy, my wife uses Sir and Ma'am alot lol.

I'm off to bed but if this still ain't working for ya tomorrow I'll dive back in... after I read the doc so I can really sound like I know what I'm talking about. MW would kick my in the nute right about now.
#28

[eluser]n0xie[/eluser]
Add this to your controller:
Code:
function _remap()
{
    $this->index($this->uri->rsegment(2));
}

See if that helps.
#29

[eluser]sasori[/eluser]
[quote author="n0xie" date="1264004818"]Add this to your controller:
Code:
function _remap()
{
    $this->index($this->uri->rsegment(2));
}

See if that helps.[/quote]

omg, it worked thank you sir..next can you give me an idea on what to do if i would use a drop down menu to filter the number of rows per pages ?

and to mr. john pantoja, yeah, am a pinoy ROFL
#30

[eluser]John Pantoja[/eluser]
[quote author="n0xie" date="1264004818"]Add this to your controller:
Code:
function _remap()
{
    $this->index($this->uri->rsegment(2));
}

See if that helps.[/quote]

I think he'll have to revert back to previous code as I noticed index() displays a different page (or it's the lack of sleep).

I was thinking of _remap() earlier, if I understand it, I think it should work in this case.
---
This might be a good place to echo it out (the segment) to see if there really is data, rule one, echo is your BFF.




Theme © iAndrew 2016 - Forum software by © MyBB