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

[eluser]sasori[/eluser]
[quote author="n0xie" date="1264001823"]
Quote:and the base_url of the index() of my controller is $config[‘base_url’] = “http://myapp/welcome/stocks_view/”
What do you mean by this?

Your code only shows function index(). I don't see a function stocks_view().[/quote]

ok i removed the "stocks_view"
now I only got
$config['base_url'] = "http://myapp/welcome/"
but still the pagination returns a 404
#12

[eluser]John Pantoja[/eluser]
guess uri_segment is meant for the page data so try 4 ... maybe?
--EDIT--

Didn't see all what you did before I posted. try 2 as it would be part of the string after welcome (shot in the dark here)

If all you have in route is the default it won't work as it's not passing data,what are all of your routes?
#13

[eluser]sasori[/eluser]
doesn't work sir, not sure if its with the uri_segment this time.. im a total noob
#14

[eluser]John Pantoja[/eluser]
[quote author="sasori" date="1264002372"]doesn't work sir, not sure if its with the uri_segment this time.. im a total noob[/quote]

it's the blind leading the blind here as I'm starting as well lol!

I want to see if I can guess this before I RTFM.
#15

[eluser]sasori[/eluser]
I already RTFM , but the problem is the actual code is a different story than the manual itself
#16

[eluser]John Pantoja[/eluser]
I guess you didn't see my edit, cut-n-paste your routes and how the url is formated for page one
#17

[eluser]n0xie[/eluser]
Remove any routes. Add this to your paginating.
Code:
$config['base_url'] = 'http://myapp/welcome/';
$config['uri_segment'] = 2;
#18

[eluser]John Pantoja[/eluser]
[quote author="n0xie" date="1264002916"]Remove any routes. Add this to your paginating.
Code:
$config['base_url'] = 'http://myapp/welcome/';
$config['uri_segment'] = 2;
[/quote]

Ah so what I was posted a bit before is correct then? url_seg is passed to the arg for index.
#19

[eluser]sasori[/eluser]
didn't work at all
[code]
$config['base_url'] = 'http://myapp/welcome/';
$config['uri_segment'] = 2;
[code]
#20

[eluser]n0xie[/eluser]
[quote author="John Pantoja" date="1264003035"][quote author="n0xie" date="1264002916"]Remove any routes. Add this to your paginating.
Code:
$config['base_url'] = 'http://myapp/welcome/';
$config['uri_segment'] = 2;
[/quote]

Ah so what I was posted a bit before is correct then? url_seg is passed to the arg for index.[/quote]
Yes and no. The pagination class 'knows' which page you are on depending on the url segment after your controller/funcion name, with controller being the first uri_segment, function the 2nd, and the argument the 3rd. In this case you didn't specify a function name so it automatically loads the index() function. This means that it need to look at the 2nd uri_segment instead of the 3rd.




Theme © iAndrew 2016 - Forum software by © MyBB