Hello,

I am trying to displays a large number of records,  with pagination.
The default
code generated by bake.php works very well , but it displays *all* the
records in the database table.

I need to add some filtering criteria,  and at the same time have
pagination. Below
is what i did so far.

- the controller that has this action :

   function index($session_id = null) {
        $this->ImportData->recursive = 0;
        if ($session_id!=null) {
            $this->paginate['conditions']=array('session_id'=>
$session_id);
        }
        $this->set('importData', $this->paginate());
    }

- the view contains something like :

<div class="paging">
<?php echo $paginator->prev('<< previous', array(), null,
array('class'=>'disabled'));?>
| <?php echo $paginator->next('next >>', array(), null,
array('class'=>'disabled'));?>
</div>
<table cellpadding="0" cellspacing="0">
    <tr>
        <th><?php echo $paginator->sort('field1');?></th>
        <th><?php echo $paginator->sort('field2');?></th>
        <th>Actions</th>
    </tr>
[...etc...]

The problme with this is that the value used for filtering
($session_id) is not
preserved in the url   by the sort(),next() and prev()   methods.

Is there any solution to solve this issue ?


Thank you.
Adrian Maier


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to