Forums / Developer / Filtering records by the value of a identifiar -

Filtering records by the value of a identifiar -

Author Message

suda then

Friday 08 April 2005 1:31:33 am

even though filtered values are not displayed but they have taken the space of a page

eg. I have total 40 records, and 10 records per page(4 pages). I have put a filter by the value of a identifiar. After filtering i got 20 records but instead of 2 pages i got 4 pages
1 page - 3
2 page - 5
3 page - 8
4th page - 4

Eirik Alfstad Johansen

Friday 15 April 2005 2:03:42 am

Hi suda,

It's hard to understand what your problem is due to poor English. Could you please try to explain better?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eivind Marienborg

Friday 15 April 2005 2:16:55 am

I think I understand.. After fetching 40 items from database, he filters out 20 of them while looping over them in template, leaving 20 to display. But because the switch is applied when displaying the content, and not when fetching, the pages won't fill up with 10 items on each. Thus meaning that the 20 items still gets displayed over 4 pages:

1 page - 3 (items)
2 page - 5 (items)
3 page - 8 (items)
4th page - 4 (items)

I don't have any good sollutions to it, though.. ;P

suda then

Tuesday 26 April 2005 9:53:50 pm

Thanks Eivind Marienborg

You have understood the problem

suda

Eivind Marienborg

Tuesday 26 April 2005 10:53:57 pm

What you need to do is filter in the fetch. Look around the docs and forum for attribute_filter, there should be plenty of examples you can use :)