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

[eluser]Tanax[/eluser]
[quote author="theprodigy" date="1238189680"]the code
Code:
$this->data['products'] = $this->Category->getProductsInCategory($id, $pConfig['per_page'], $offset);
        
if(is_array($this->data['products']))

is what I was talking about when I said you were treating it like an array. You have a large block of code being based on if $this->data['products'] is an array:
[/quote]

Ohh.. right.. Weird then how all of that code is actually run cause I get the specified css classes like tested in the if-block :S xD

Can I do like is_object ?

Thanks for pointing it out! Eventhough it works in some wierd way.

@TheFuzzy0ne-
This pagination class is quite useless then if it can't paginate data xD

I already have a great custom-written pagination class, how can I include it?

Also, I would be willing to "donate" this class to the library instead of the current pagination class.
#12

[eluser]TheFuzzy0ne[/eluser]
[quote author="Tanax" date="1238190368"]@TheFuzzy0ne-
This pagination class is quite useless then if it can't paginate data xD[/quote]

You can paginate data, just not the way you were hoping. I think that CodeIgniter's approach gives more flexibility, however, it's not for everyone.

[quote author="Tanax" date="1238190368"]I already have a great custom-written pagination class, how can I include it?[/quote]

Without knowing anything about the library, that'd be hard to say.
#13

[eluser]Tanax[/eluser]
[quote author="TheFuzzy0ne" date="1238190873"][quote author="Tanax" date="1238190368"]@TheFuzzy0ne-
This pagination class is quite useless then if it can't paginate data xD[/quote]

You can paginate data, just not the way you were hoping. I think that CodeIgniter's approach gives more flexibility, however, it's not for everyone.

[quote author="Tanax" date="1238190368"]I already have a great custom-written pagination class, how can I include it?[/quote]

Without knowing anything about the library, that'd be hard to say.[/quote]

Put it like this; What's the difference if I include it like a helper, model or library?
#14

[eluser]Tanax[/eluser]
I solved this by changing the URI segment from 3 to 4.

Now the only concern I have is how to page it check the PAGE instead of the offset? If that's possible?
Thanks
#15

[eluser]TheFuzzy0ne[/eluser]
Yes, but only by overriding the pagination library.




Theme © iAndrew 2016 - Forum software by © MyBB