Great! Thanks a lot!
On 9 Jan., 03:18, brian wrote:
> The paginate method calls find() internally. So, what you've done here
> is run the find() yourself, altered the data, then set the data to the
> results of another (paginated) result. It's, more or less, as if you
> called find() again.
>
>
The paginate method calls find() internally. So, what you've done here
is run the find() yourself, altered the data, then set the data to the
results of another (paginated) result. It's, more or less, as if you
called find() again.
What you should do is create an afterFind() method in the *model*
You are setting the paginate data. Not your restructured data. Btw,
you should do this kind of thing in the model.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to
Hi Jared,
thank you, but it did not worked, although I have php5 installed.
Is there an other way?
Kind regards,
volka
On 8 Jan., 22:43, Jared wrote:
> The foreach loop is working on a copy of $travelogue. So you either
> need to pass it in by reference by doing:
> foreach ( $travelogues as
The foreach loop is working on a copy of $travelogue. So you either
need to pass it in by reference by doing:
foreach ( $travelogues as $travelogue){
...}
unset($travelogue).
This will only work in php5.
volka wrote:
> Hi there,
>
> I have the following index() method in my controller:
>
> func
Hi there,
I have the following index() method in my controller:
function index() {
$travelogues = $this->Travelogue->find('all');
$i = 0;
foreach ( $travelogues as $travelogue):
if (!empty($travelogue['Travelogue']['gallery