I try used pagination in cakephp, but this is my return
Notice (8): Undefined variable: paginator [APP\views\culturas
\dados_periodo.ctp, line 53]
Code Context
<?php
echo $paginator->prev();
this is my controller(only one part)
var $paginate = array('limit'=>20,'page'=>1);
$enviaDados = $this->paginate("Dados_periodo");
$this->set('enviaDados',$enviaDados);
$this->render('dados_periodo');
this is my view (complete)
<?php
echo $paginator->prev();
echo $paginator->numbers(array('separator'=>' - '));
echo $paginator->next();
?>
<table class="tabdados">
<tr>
<th><?php echo $paginator->sort('Cultura', 'cultura_id'); ?></th>
<th><?php echo $paginator->sort('Tipo do Plantio',
'tipo_plantio_id'); ?></th>
<th><?php echo $paginator->sort('Ano', 'anos_id'); ?></th>
<th><?php echo $paginator->sort('Periodo', 'periodo_id'); ?></th>
<th><?php echo $paginator->sort('Taxa', 'taxa'); ?></th>
</tr>
<?php foreach ($enviaDados as $enviaDado): ?>
<tr>
<td><?php echo $enviaDado['Dados_periodo']['cultura_id']; ?></td>
<td><?php echo $enviaDado['Dados_periodo']['tipo_plantio_id']; ?></td>
<td><?php echo $enviaDado['Dados_periodo']['ano_id']; ?></td>
<td><?php echo $enviaDado['Dados_periodo']['periodo_id']; ?></td>
<td><?php echo $enviaDado['Dados_periodo']['taxa']; ?></td>
</tr>
<?php endforeach; ?>
</table>
What is happen ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---